import { j as c } from "../../../../../_virtual/jsx-runtime.js";
import p, { STATUS as i } from "../../../../../node_modules/.pnpm/react-joyride@2.9.3_@types_react@18.3.3_react-dom@18.3.0-canary-3d9b20132-20240124_reac_727d0371893c6960b0e13b03636e63ea/node_modules/react-joyride/dist/index.js";
import { tours as b } from "../tours/index.js";
import { useLocalStorage as s } from "../../../../../node_modules/.pnpm/usehooks-ts@3.1.1_react@18.3.0-canary-3d9b20132-20240124/node_modules/usehooks-ts/dist/index.js";
function S() {
  const [n, d] = s("seen_tours", []), [l, f] = s("tours_disabled", !1);
  if (l)
    return null;
  const a = Object.entries(b).find(([t]) => !n.includes(t)), [e, o] = a || [], u = (t) => {
    const { status: r } = t;
    e && (r === i.FINISHED || r === i.SKIPPED) && d((m) => [...m, e]);
  };
  return e && o ? /* @__PURE__ */ c.jsx(
    p,
    {
      steps: o,
      callback: u,
      continuous: !0,
      showSkipButton: !0,
      hideCloseButton: !0,
      locale: {
        back: "Back",
        close: "Close",
        last: "Finish",
        next: "Next",
        nextLabelWithProgress: "Next ({step}/{steps})",
        skip: "Skip tour"
      },
      styles: {
        buttonNext: {
          backgroundColor: "#7270c6",
          padding: "0.7rem 2rem",
          borderRadius: "0.25rem"
        },
        buttonBack: {
          padding: "0.7rem 2rem",
          backgroundColor: "#EFEFEF",
          borderRadius: "0.25rem",
          color: "#333"
        },
        buttonSkip: {
          padding: "0.7rem 1rem",
          backgroundColor: "#E5E5E5",
          borderRadius: "0.25rem",
          color: "#333",
          width: "auto"
        },
        buttonClose: {
          scale: 0.7,
          borderRadius: "0.25rem",
          padding: "10px"
        },
        tooltip: {
          fontFamily: "inherit",
          padding: "0",
          borderRadius: "0.50rem"
        },
        tooltipFooter: {
          padding: "0.5rem",
          backgroundColor: "#f9f9f9",
          borderTop: "1px solid #e5e5e5",
          borderBottomLeftRadius: "0.5rem",
          borderBottomRightRadius: "0.5rem"
        },
        tooltipTitle: {
          textAlign: "left",
          fontWeight: "500",
          fontSize: "1rem",
          padding: "1rem 1rem 0 1rem",
          fontFamily: "inherit"
        },
        tooltipContent: {
          textAlign: "left",
          padding: "1rem",
          fontFamily: "inherit",
          fontSize: "0.9rem"
        }
      }
    }
  ) : null;
}
export {
  S as default
};
//# sourceMappingURL=Tour.js.map
