import { jsx } from "react/jsx-runtime";
import React from "react";
import { render } from "@testing-library/react";
import { UserFilled } from "@gympass/yoga-icons";
import { ThemeProvider } from "../..";
import Avatar from "./Avatar";
describe("<Avatar />", () => {
  it("should match snapshot in default avatar", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Avatar, { width: 78, height: 78, fill: "black" }) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should match snapshot in default avatar with src and alt prop", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Avatar, { src: "https://github.com/Gympass.png", alt: "Gympass brand logo" }) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should match snapshot in default avatar with placeholder prop", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Avatar, { icon: UserFilled }) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should match snapshot in circle avatar", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Avatar.Circle, {}) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should match snapshot in circle avatar with placeholder prop", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Avatar.Circle, { icon: UserFilled }) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should match snapshot in circle avatar with src and alt prop", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
        Avatar.Circle,
        {
          src: "https://github.com/Gympass.png",
          alt: "Gympass brand logo"
        }
      ) })
    );
    expect(container).toMatchSnapshot();
  });
  it("should match snapshot in avatar with children prop", () => {
    const { container } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Avatar, { children: /* @__PURE__ */ jsx("p", { children: "LC" }) }) })
    );
    expect(container).toMatchSnapshot();
  });
});
