import { jsx as _jsx } from "react/jsx-runtime";
import { describe, it, expect } from "vitest";
import { render } from "@testing-library/react";
import { ThreadSkeleton } from "../ThreadSkeleton";
describe("ThreadSkeleton", () => {
    it("renders with aria-busy and loading label", () => {
        const { container } = render(_jsx(ThreadSkeleton, {}));
        const root = container.firstElementChild;
        expect(root.getAttribute("aria-busy")).toBe("true");
        expect(root.getAttribute("aria-label")).toBe("Loading conversation");
    });
    it("renders human message bubble silhouettes", () => {
        const { container } = render(_jsx(ThreadSkeleton, {}));
        const humanBubbles = container.querySelectorAll("[class*='ms-']");
        expect(humanBubbles.length).toBe(2);
    });
    it("renders AI response line silhouettes", () => {
        const { container } = render(_jsx(ThreadSkeleton, {}));
        const pulseContainer = container.querySelector(".animate-pulse");
        expect(pulseContainer).toBeTruthy();
        const lines = pulseContainer.querySelectorAll("[style]");
        expect(lines.length).toBe(7);
    });
    it("applies custom className", () => {
        const { container } = render(_jsx(ThreadSkeleton, { className: "my-custom-class" }));
        const root = container.firstElementChild;
        expect(root.className).toContain("my-custom-class");
    });
    it("uses muted color tokens for skeleton bars", () => {
        const { container } = render(_jsx(ThreadSkeleton, {}));
        const bars = container.querySelectorAll("[class*='bg-muted']");
        expect(bars.length).toBeGreaterThan(0);
    });
});
//# sourceMappingURL=thread-skeleton.test.js.map