import { jsx, jsxs } from "react/jsx-runtime";
import React from "react";
import { render } from "@testing-library/react-native";
import { Text } from ".";
import { ThemeProvider } from "../..";
describe("<Text />", () => {
  describe("Snapshots", () => {
    it("should match snapshot with Text", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.Display1, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Display2, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Display3, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Display4, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.DisplayNumber, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H1, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H2, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H3, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H4, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Body1, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Body2, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Caption, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Overline, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.SectionTitle, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.SmallestException, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Small, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Tiny, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Regular, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Medium, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Bold, { children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.Black, { children: "Live the mission" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with Text when v3Theme is settled", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.Display1, { children: "Text Display1" }),
          /* @__PURE__ */ jsx(Text.Display2, { children: "Text Display2" }),
          /* @__PURE__ */ jsx(Text.Display3, { children: "Text Display3" }),
          /* @__PURE__ */ jsx(Text.Display4, { children: "Text Display4" }),
          /* @__PURE__ */ jsx(Text.DisplayNumber, { children: "Text DisplayNumber" }),
          /* @__PURE__ */ jsx(Text.H1, { children: "Text H1" }),
          /* @__PURE__ */ jsx(Text.H2, { children: "Text H2" }),
          /* @__PURE__ */ jsx(Text.H3, { children: "Text H3" }),
          /* @__PURE__ */ jsx(Text.H4, { children: "Text H4" }),
          /* @__PURE__ */ jsx(Text.Body1, { children: "Text Body1" }),
          /* @__PURE__ */ jsx(Text.Body2, { children: "Text Body2" }),
          /* @__PURE__ */ jsx(Text.Caption, { children: "Text Caption" }),
          /* @__PURE__ */ jsx(Text.Overline, { children: "Text Overline" }),
          /* @__PURE__ */ jsx(Text.SectionTitle, { children: "Text SectionTitle" }),
          /* @__PURE__ */ jsx(Text.SmallestException, { children: "Text SmallestException" }),
          /* @__PURE__ */ jsx(Text, { children: "Text" }),
          /* @__PURE__ */ jsx(Text.Small, { children: "Text Small" }),
          /* @__PURE__ */ jsx(Text.Tiny, { children: "Text Tiny" }),
          /* @__PURE__ */ jsx(Text.Regular, { children: "Text Regular" }),
          /* @__PURE__ */ jsx(Text.Medium, { children: "Text Medium" }),
          /* @__PURE__ */ jsx(Text.Bold, { children: "Text Bold" }),
          /* @__PURE__ */ jsx(Text.Black, { children: "Text Black" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with Text variant", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.H1, { variant: "primary", children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H2, { variant: "secondary", children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H3, { variant: "tertiary", children: "Live the mission" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with Text light", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.H1, { light: true, children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H2, { light: true, children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H3, { light: true, children: "Live the mission" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with Text fontSize", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.Small, { fontSize: "xsmall", children: "Live the small mission" }),
          /* @__PURE__ */ jsx(Text.Tiny, { fontSize: "medium", children: "Live the medium mission" }),
          /* @__PURE__ */ jsx(Text.Regular, { fontSize: "xlarge", children: "Live the xlarge mission" }),
          /* @__PURE__ */ jsx(Text.Medium, { fontSize: "xxxlarge", children: "Live the xxxlarge mission" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with Text size", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.Small, { size: "xsmall", children: "Live the small mission" }),
          /* @__PURE__ */ jsx(Text.Tiny, { size: "medium", children: "Live the medium mission" }),
          /* @__PURE__ */ jsx(Text.Regular, { size: "xlarge", children: "Live the xlarge mission" }),
          /* @__PURE__ */ jsx(Text.Medium, { size: "xxxlarge", children: "Live the xxxlarge mission" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with inverted Text", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { inverted: true, children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with truncated lines Text", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(Text, { numberOfLines: 1, children: [
          "Live the mission",
          /* @__PURE__ */ jsx("br", {}),
          "even in one line"
        ] }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with border prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { border: "small", bRadius: "small", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with background color prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { backgroundColor: "vibin", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with elevation prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { elevation: "medium", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with spacing prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { m: "medium", paddingVertical: "large", paddingHorizontal: "small", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with typography prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
          Text,
          {
            color: "text.primary",
            fontSize: "small",
            fontWeight: "medium",
            lineHeight: "small",
            children: "Live the mission"
          }
        ) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with display prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { display: "flex", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with position prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { position: "absolute", top: "small", left: "small", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with flexes prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { display: "flex", flexGrow: 1, children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with overflows prop system", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { overflow: "scroll", children: "Live the mission" }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with Text bold", () => {
      const { toJSON } = render(
        /* @__PURE__ */ jsxs(ThemeProvider, { children: [
          /* @__PURE__ */ jsx(Text.H1, { bold: true, children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H2, { bold: true, children: "Live the mission" }),
          /* @__PURE__ */ jsx(Text.H3, { bold: true, children: "Live the mission" })
        ] })
      );
      expect(toJSON()).toMatchSnapshot();
    });
  });
});
