import { jsx, jsxs } from "react/jsx-runtime";
import React from "react";
import { render } from "@testing-library/react-native";
import { BuildingFilled } from "@gympass/yoga-icons";
import { ThemeProvider } from "../../..";
import Result from ".";
import Avatar from "../../../Avatar";
import Text from "../../../Text";
const attendanceList = [
  {
    description: "Attendance 01",
    icon: BuildingFilled
  },
  {
    description: "Attendance 02",
    icon: BuildingFilled
  }
];
const entranceList = [
  {
    children: "From 7:30 am to 9:00 pm",
    variant: "stamina"
  }
];
const activitiesList = [
  {
    children: "Yoga",
    variant: "deep"
  },
  {
    children: "Meditation",
    variant: "deep"
  },
  {
    children: "Pilates",
    variant: "deep"
  },
  {
    children: "Activity4",
    variant: "deep"
  },
  {
    children: "Activity5",
    variant: "deep"
  }
];
const tagsList = [
  {
    children: "Plan x Product availability",
    variant: "informative"
  },
  {
    children: "Restriction",
    variant: "attention"
  }
];
describe("<Result />", () => {
  it("should match snapshot", () => {
    const { toJSON } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(
        Result,
        {
          rate: "5.0",
          avatar: /* @__PURE__ */ jsx(Avatar.Circle, {}),
          attendances: attendanceList,
          title: "Jane Doe",
          subTitle: "Activity",
          divided: true,
          children: [
            /* @__PURE__ */ jsx(Result.Details, { items: entranceList, dots: true, renderItem: Text.Small }),
            /* @__PURE__ */ jsx(
              Result.Details,
              {
                items: activitiesList,
                dots: true,
                limit: 3,
                renderItem: Text.Small,
                limitLabel: "activities"
              }
            ),
            /* @__PURE__ */ jsx(Result.Tags, { items: tagsList }),
            /* @__PURE__ */ jsx(Result.Button, { children: "See Details" })
          ]
        }
      ) })
    );
    expect(toJSON()).toMatchSnapshot();
  });
  it("should match snapshot without limitLabel prop", () => {
    const { toJSON } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(
        Result,
        {
          rate: "5.0",
          avatar: /* @__PURE__ */ jsx(Avatar.Circle, {}),
          attendances: attendanceList,
          title: "John Doe",
          subTitle: "Activity",
          divided: true,
          children: [
            /* @__PURE__ */ jsx(Result.Details, { items: entranceList, dots: true, renderItem: Text.Small }),
            /* @__PURE__ */ jsx(
              Result.Details,
              {
                items: activitiesList,
                dots: true,
                limit: 2,
                renderItem: Text.Small
              }
            ),
            /* @__PURE__ */ jsx(Result.Tags, { items: tagsList }),
            /* @__PURE__ */ jsx(Result.Button, { children: "See Details" })
          ]
        }
      ) })
    );
    expect(toJSON()).toMatchSnapshot();
  });
  it("should match snapshot without attendence", () => {
    const { toJSON } = render(
      /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(Result, { avatar: /* @__PURE__ */ jsx(Avatar, {}), title: "Gym", children: [
        /* @__PURE__ */ jsx(Result.Details, { items: entranceList, dots: true }),
        /* @__PURE__ */ jsx(Result.Details, { items: activitiesList, dots: true })
      ] }) })
    );
    expect(toJSON()).toMatchSnapshot();
  });
});
