"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react"));
var import_react_native = require("react-native");
var import_react_native2 = require("@testing-library/react-native");
var import_Theme = __toESM(require("../../Theme"));
var import__ = __toESM(require(".."));
describe("<Stepper />", () => {
  describe("Snapshots", () => {
    it("should match snapshot with first step active", () => {
      const { toJSON } = (0, import_react_native2.render)(
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.default, { activeStep: 0, children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step one", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step one content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step two", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step two content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step three", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step three content" }) })
        ] }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with first step active and secondary color", () => {
      const { toJSON } = (0, import_react_native2.render)(
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.default, { activeStep: 0, secondary: true, children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step one", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step one content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step two", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step two content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step three", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step three content" }) })
        ] }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
    it("should match snapshot with second step active", () => {
      const { toJSON } = (0, import_react_native2.render)(
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.default, { activeStep: 1, children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step one", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step one content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step two", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step two content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step three", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step three content" }) })
        ] }) })
      );
      expect(toJSON()).toMatchSnapshot();
    });
  });
  describe("Steps", () => {
    it("should change the active step", () => {
      const { queryByText, rerender } = (0, import_react_native2.render)(
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.default, { activeStep: 0, children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step one", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step one content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step two", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step two content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step three", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step three content" }) })
        ] }) })
      );
      expect(queryByText("step one content")).toBeTruthy();
      expect(queryByText("step two content")).toBeFalsy();
      expect(queryByText("step three content")).toBeFalsy();
      rerender(
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.default, { activeStep: 1, children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step one", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step one content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step two", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step two content" }) }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default.Step, { label: "step three", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { children: "step three content" }) })
        ] }) })
      );
      expect(queryByText("step one content")).toBeFalsy();
      expect(queryByText("step two content")).toBeTruthy();
      expect(queryByText("step three content")).toBeFalsy();
    });
  });
});
