import { jsx } from "react/jsx-runtime";
import React from "react";
import { render, fireEvent, screen, within } from "@testing-library/react";
import { Booking, Close } from "@gympass/yoga-icons";
import ThemeProvider, { v3theme } from "../../Theme";
import Button from "..";
describe("<Button />", () => {
  describe("Snapshots", () => {
    describe("primary buttons", () => {
      describe("with v3theme", () => {
        it("should match snapshot with v3theme Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { theme: v3theme, children: /* @__PURE__ */ jsx(Button, {}) })
          );
          expect(container).toMatchSnapshot();
        });
      });
      describe("Without props", () => {
        it("should match snapshot with default Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, {}) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with default Button with Icon", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with default Button and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with default Button with Icon and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { icon: Booking, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, {}) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button with Icon", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button with Icon and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { icon: Booking, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with text Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, {}) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with text Button with Icon", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with link Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Link, {}) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with icon Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with text icon and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
      });
      describe("With inverted prop", () => {
        it("should match snapshot with default Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with default Button and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with default Button with Icon", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with default Button with Icon and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, icon: Booking, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button with Icon", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with outline Button with Icon and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, icon: Booking, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with text Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { inverted: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with icon Button", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { inverted: true, icon: Booking }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("should match snapshot with icon Button and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { inverted: true, icon: Booking, isLoading: true }) })
          );
          expect(container).toMatchSnapshot();
        });
        describe("With small prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button when is Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { small: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button when is Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { small: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { small: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, small: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, small: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { icon: Booking, small: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, small: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, small: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
        describe("With full prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { full: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { full: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
        describe("With disabled prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with link Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Link, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { disabled: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
      });
      describe("buttons rendering as an anchor", () => {
        it("Default Button with href prop", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { href: "http://www.gympass.com", target: "blank", children: "Default Button as an anchor" }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("Default Button with href prop and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { href: "http://www.gympass.com", target: "blank", isLoading: true, children: "Default Button as an anchor" }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("Link Button with href prop", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Link, { href: "http://www.gympass.com", target: "blank", children: "Link as an anchor" }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("Outline Button with href prop", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { href: "http://www.gympass.com", target: "blank", children: "Outline as an anchor" }) })
          );
          expect(container).toMatchSnapshot();
        });
        it("Outline Button with href prop and Loading", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
              Button.Outline,
              {
                href: "http://www.gympass.com",
                target: "blank",
                isLoading: true,
                children: "Outline as an anchor"
              }
            ) })
          );
          expect(container).toMatchSnapshot();
        });
        it("Text Button with href prop", () => {
          const { container } = render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { href: "http://www.gympass.com", target: "blank", children: "Text as an anchor" }) })
          );
          expect(container).toMatchSnapshot();
        });
      });
      describe("secondary buttons", () => {
        describe("Without props", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { secondary: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { secondary: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { secondary: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with link Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Link, { secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with link Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Link, { icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
        describe("With inverted prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { inverted: true, icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { inverted: true, icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { inverted: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { inverted: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { inverted: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { inverted: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { inverted: true, icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
        describe("With small prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { small: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { small: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { small: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { small: true, icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, small: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, small: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { icon: Booking, small: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, small: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, small: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
        describe("With full prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { full: true, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { full: true, icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { full: true, icon: Booking, secondary: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { full: true, icon: Booking, secondary: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
      });
      describe("disabled buttons", () => {
        describe("With disabled prop", () => {
          it("should match snapshot with default Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with link Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Link, { disabled: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with default Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with outline Button with Icon and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { disabled: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with text Button with Icon", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { disabled: true, icon: Booking }) })
            );
            expect(container).toMatchSnapshot();
          });
          it("should match snapshot with icon Button and Loading", () => {
            const { container } = render(
              /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { disabled: true, icon: Booking, isLoading: true }) })
            );
            expect(container).toMatchSnapshot();
          });
        });
      });
    });
    describe("onClick prop", () => {
      it("should call onClick function when click on Button", () => {
        const onClickMock = jest.fn();
        const { getByText } = render(
          /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { onClick: onClickMock, children: "Button" }) })
        );
        fireEvent.click(getByText("Button"));
        expect(onClickMock).toHaveBeenCalled();
      });
      it("should call onClick function when click on Button.Outline", () => {
        const onClickMock = jest.fn();
        const { getByText } = render(
          /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { onClick: onClickMock, children: "Button.Outline" }) })
        );
        fireEvent.click(getByText("Button.Outline"));
        expect(onClickMock).toHaveBeenCalled();
      });
      it("should call onClick function when click on Button.Text", () => {
        const onClickMock = jest.fn();
        const { getByText } = render(
          /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Text, { onClick: onClickMock, children: "Button.Text" }) })
        );
        fireEvent.click(getByText("Button.Text"));
        expect(onClickMock).toHaveBeenCalled();
      });
      it("should call onClick function when click on Button.Icon", () => {
        const onClickMock = jest.fn();
        const { getByRole } = render(
          /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Close, onClick: onClickMock }) })
        );
        fireEvent.click(getByRole("button"));
        expect(onClickMock).toHaveBeenCalled();
      });
      it("should not call onClick function when click on Button disabled", () => {
        const onClickMock = jest.fn();
        const { getByText } = render(
          /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { disabled: true, onClick: onClickMock, children: "Button" }) })
        );
        fireEvent.click(getByText("Button"));
        expect(onClickMock).not.toHaveBeenCalled();
      });
      it("should not call onClick function when click on Button is loading", () => {
        const onClickMock = jest.fn();
        const { getByText } = render(
          /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { isLoading: true, onClick: onClickMock, children: "Button" }) })
        );
        fireEvent.click(getByText("Button"));
        expect(onClickMock).not.toHaveBeenCalled();
      });
    });
    describe("Loading prop", () => {
      describe("Default Button", () => {
        it("Text should not to be visible", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { isLoading: true, children: "Button" }) })
          );
          const text = screen.getByText("Button");
          expect(text).toHaveStyle("color: transparent");
        });
        it("Icon should not to be visible", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { icon: Booking, isLoading: true, "aria-label": "button", children: "Button" }) })
          );
          const button = screen.getByRole("button", { name: "button" });
          const svg = within(button).getByRole("img");
          expect(svg).toHaveStyle("fill: transparent");
        });
        it("Spinner should to be rendered", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { isLoading: true, children: "Button" }) })
          );
          const spinner = screen.getByLabelText("loading-icon");
          expect(spinner).toBeVisible();
        });
        it("Button should to be disabled", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button, { isLoading: true, "aria-label": "button", children: "Button" }) })
          );
          const button = screen.getByRole("button", { name: "button" });
          expect(button).toBeDisabled();
        });
      });
      describe("Outline Button", () => {
        it("Text should not to be visible", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { isLoading: true, children: "Button" }) })
          );
          const text = screen.getByText("Button");
          expect(text).toHaveStyle("color: transparent");
        });
        it("Icon should not to be visible", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { icon: Booking, isLoading: true, "aria-label": "button", children: "Button" }) })
          );
          const button = screen.getByRole("button", { name: "button" });
          const svg = within(button).getByRole("img");
          expect(svg).toHaveStyle("fill: transparent");
        });
        it("Spinner should to be rendered", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { isLoading: true, children: "Button" }) })
          );
          const spinner = screen.getByLabelText("loading-icon");
          expect(spinner).toBeVisible();
        });
        it("Button should to be disabled", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Outline, { isLoading: true, "aria-label": "button", children: "Button" }) })
          );
          const button = screen.getByRole("button", { name: "button" });
          expect(button).toBeDisabled();
        });
      });
      describe("Icon Button", () => {
        it("Icon should not to be visible", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, isLoading: true, "aria-label": "button" }) })
          );
          const button = screen.getByRole("button", {
            name: "button"
          });
          const svg = within(button).queryByRole("img");
          expect(svg).toBeNull();
        });
        it("Spinner should to be rendered", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, isLoading: true }) })
          );
          const spinner = screen.getByLabelText("loading-icon");
          expect(spinner).toBeVisible();
        });
        it("Button should to be disabled", () => {
          render(
            /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Button.Icon, { icon: Booking, isLoading: true, "aria-label": "button" }) })
          );
          const button = screen.getByRole("button", { name: "button" });
          expect(button).toBeDisabled();
        });
      });
    });
  });
});
