import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it, vi } from "vitest";
import { CommentBoard } from "./comment-board";
import { CommentComposer } from "./comment-composer";
import { AdminCommentInbox } from "./admin-comment-inbox";
import type { CommentItem } from "@/lib/comments/types";
vi.mock("next/navigation", () => ({ useRouter: () => ({ push: vi.fn() }) }));
const viewer = { id: "admin", admin: true, name: "Admin" };
const comment: CommentItem = {
id: "test", rootId: null, replyToId: null, replyToName: null,
authorName: "Author", authorImage: null, authorAdmin: false,
text: "ข้อความของผู้ใช้", images: [], version: 2,
createdAt: "2026-10-08T12:00:00Z", editedAt: "2026-10-08T12:00:00Z",
hidden: false, ownHidden: false, deleted: false, hearted: false,
likes: 0, reaction: 0, replyCount: 0, hasReplies: false,
canEdit: true, canInteract: true, canModerate: true,
target: "guide:test", targetName: "Test", targetImage: null, href: "/test/comment",
};
describe("Thai comment UI", () => {
it("keeps the public board in Thai", () => {
const html = renderToStaticMarkup(