import { jsx as g } from "react/jsx-runtime";
import { useEffect as l, createContext as T, useContext as k, useState as d, useMemo as x } from "react";
import { kebabCase as m } from "change-case";
import { d0 as f, cY as N, c$ as y, c_ as b, cZ as $, cX as P, cW as E, cU as O, cQ as A, cP as H, cM as M, cS as W, cV as D, cT as h, cR as F, cK as L, cO as R, cN as w, cL as Q, cH as j, cF as q, cJ as z, cG as G, cE as J, cI as K, cD as U, cC as X, cB as Y, cA as Z, cs as _, cv as V, cp as rr, cz as er, cy as or, cx as tr, cw as ar, cr, cq as ur, cu as nr, ct as ir, co as sr, cn as lr, cm as pr, cl as vr, ch as gr, cf as dr, c9 as Br, cd as Sr, cb as Cr, c7 as Ir, c6 as Tr, c5 as kr, c1 as xr, c0 as mr, b$ as fr, bX as Nr, ck as yr, cj as br, ci as $r, ce as Pr, cg as Er, c8 as Or, cc as Ar, ca as Hr, c4 as Mr, c3 as Wr, c2 as Dr, b_ as hr, bZ as Fr, bY as Lr, bW as Rr, bU as wr, bS as Qr, bV as jr, bT as qr, bR as zr, bQ as Gr, bP as Jr, bO as Kr, bH as Ur, by as Xr, bA as Yr, bC as Zr, bN as _r, bw as Vr, bM as re, bL as ee, bK as oe, bx as te, bz as ae, bF as ce, bG as ue, bB as ne, bD as ie, bI as se, bJ as le, bt as pe, br as ve, bp as ge, bk as de, bn as Be, bm as Se, bl as Ce, bv as Ie, bu as Te, bs as ke, bq as xe, bo as me, bj as fe, bi as Ne, bh as ye, bg as be, bf as $e, be as Pe, bd as Ee, bc as Oe, bb as Ae, ba as He, b9 as Me, b8 as We, b7 as De, b6 as he, b5 as Fe, b4 as Le, b3 as Re, b2 as we } from "./variables-91UvS2rU.mjs";
const Qe = "#f4e0ff", je = "#c461f7", qe = "#29003e", ze = "#ede1d8", Ge = "#4f4741", Je = "#3b332d", Ke = "#ffffff", Ue = "#202022", Xe = "rgba(255, 255, 255, 0.95)", Ye = "rgba(255, 255, 255, 0.66)", Ze = "rgba(255, 255, 255, 0.37)", _e = "rgba(0, 0, 0, 0.8)", Ve = "rgba(0, 0, 0, 0.54)", ro = "rgba(0, 0, 0, 0.44)", eo = "#e4b6fb", oo = "#f4e0ff", to = "#faf0ff", ao = "#4e0174", co = "#ffffff", uo = "#8c07d0", no = "#6d02a3", io = "#4e0174", so = "#ffffff", lo = "#ffffff", po = "#29003e", vo = "#ffffff", go = "#29003e", Bo = "#ffffff", So = "#ffffff", Co = "#d58df9", Io = "#d58df9", To = "#ffafc9", ko = "#980233", xo = "#fb4885", mo = "#e4175c", fo = "#79d9a7", No = "#02562b", yo = "#1fa15e", bo = "#f9bb5b", $o = "#f39200", Po = "#a86602", Eo = "#91cdf4", Oo = "#3694d3", Ao = "#ffffff", Ho = "#ffffff", Mo = "#4e0174", Wo = "#202022", Do = "#29003e", ho = "#f4e0ff", Fo = "#ffffff", Lo = "#121212", Ro = "#ffffff", wo = "#202022", Qo = "#f5f5fa", jo = "rgba(0, 0, 0, 0.71)", qo = "rgba(255, 255, 255, 0.84)", zo = "#03385b", Go = "#f4e0ff", Jo = "#e4b6fb", Ko = "#d58df9", Uo = "#4e0174", Xo = "#6d02a3", Yo = "#8c07d0", Zo = "#990ae3", _o = "#c461f7", Vo = "#d58df9", rt = "#990ae3", et = "#6d02a3", ot = "#4e0174", tt = "rgba(255, 255, 255, 0.11)", at = "rgba(0, 0, 0, 0.1)", ct = "#4e0174", ut = "#e4b6fb", nt = "#6d02a3", it = "#d58df9", st = "rgba(255, 255, 255, 0.16)", lt = "rgba(0, 0, 0, 0.05)", pt = "rgba(255, 255, 255, 0.07)", vt = "rgba(0, 0, 0, 0.05)", gt = "#e4175c", dt = "#c00543", Bt = "#980233", St = "#03385b", Ct = "#62b2e7", It = "#003e1e", Tt = "#3dbf7c", kt = "#1fa15e", xt = "#700025", mt = "#ff80ab", ft = "#fb4885", Nt = "#4c2f03", yt = "#f39200", bt = "#f39200", $t = "#353537", Pt = "#6d02a3", Et = "#f4e0ff", Ot = "#ffffff", At = "#f4e0ff", Ht = "#29003e", Mt = "#4f4741", Wt = "#2d2824", Dt = "rgba(255, 255, 255, 0.29)", ht = "rgba(0, 0, 0, 0.33)", Ft = "rgba(255, 255, 255, 0.46)", Lt = "rgba(0, 0, 0, 0.54)", Rt = "rgba(255, 255, 255, 0.16)", wt = "rgba(0, 0, 0, 0.16)", Qt = "#c461f7", jt = "#e4b6fb", qt = "#8c07d0", zt = "#f4e0ff", Gt = "#faf0ff", Jt = "#6d02a3", Kt = "#4e0174", Ut = "#990ae3", Xt = "#d58df9", Yt = "rgba(255, 255, 255, 0.37)", Zt = "rgba(0, 0, 0, 0.44)", _t = "#e4b6fb", Vt = "#6d02a3", ra = "#fb4885", ea = "#e4175c", oa = "#f39200", ta = "#3694d3", aa = "#1fa15e", ca = "#018842", ua = {
  colorBrandDeepPurple: Qe,
  colorBrandCorePurple: je,
  colorBrandLightPurple: qe,
  colorBrandDeepBeige: ze,
  colorBrandBeige: Ge,
  colorBrandLightBeige: Je,
  colorBrandOffBlack: Ke,
  colorBrandWhite: Ue,
  colorTextDefault: Xe,
  colorTextMedium: Ye,
  colorTextWeak: Ze,
  colorTextDefaultNegative: _e,
  colorTextMediumNegative: Ve,
  colorTextWeakNegative: ro,
  colorTextInteractivePrimary: eo,
  colorTextInteractivePrimaryHover: oo,
  colorTextInteractivePrimaryActive: to,
  colorTextInteractiveOnPrimary: ao,
  colorTextInteractiveOnExpressive: so,
  colorTextInteractiveOnExpressiveHover: po,
  colorTextInteractiveOnExpressiveActive: go,
  colorTextInteractiveOnDestructive: So,
  colorTextInteractiveSelected: Co,
  colorTextInteractivePrimaryNegative: uo,
  colorTextInteractivePrimaryHoverNegative: no,
  colorTextInteractivePrimaryActiveNegative: io,
  colorTextInteractiveOnPrimaryNegative: co,
  colorTextInteractiveOnExpressiveNegative: lo,
  colorTextInteractiveOnExpressiveHoverNegative: vo,
  colorTextInteractiveOnExpressiveActiveNegative: Bo,
  colorTextStatusInfoMedium: Oo,
  colorTextStatusInfoStrong: Eo,
  colorTextStatusSuccessMedium: yo,
  colorTextStatusSuccessStrong: fo,
  colorTextStatusWarningMedium: $o,
  colorTextStatusWarningStrong: bo,
  colorTextStatusErrorMedium: xo,
  colorTextStatusErrorStrong: To,
  colorTextStatusNeutral: Ao,
  colorTextStatusSpecial: Ho,
  colorTextStatusAttention: Mo,
  colorTextStatusDiscount: Io,
  colorTextStatusBlackFriday: Wo,
  colorTextStatusSuccessStrongNegative: No,
  colorTextStatusErrorMediumNegative: mo,
  colorTextStatusErrorStrongNegative: ko,
  colorTextStatusWarningMediumNegative: Po,
  colorTextToneOnTonePrimary: Do,
  colorTextToneOnToneSecondary: ho,
  colorTextToneOnToneTertiary: Fo,
  colorBackgroundPrimary: Lo,
  colorBackgroundSecondary: wo,
  colorBackgroundOnImage: jo,
  colorBackgroundPrimaryNegative: Ro,
  colorBackgroundSecondaryNegative: Qo,
  colorBackgroundOnImageNegative: qo,
  colorBackgroundInteractivePrimary: Go,
  colorBackgroundInteractivePrimaryHover: Jo,
  colorBackgroundInteractivePrimaryActive: Ko,
  colorBackgroundInteractiveExpressive: Zo,
  colorBackgroundInteractiveExpressiveHover: _o,
  colorBackgroundInteractiveExpressiveActive: Vo,
  colorBackgroundInteractiveTransparentHover: ct,
  colorBackgroundInteractiveTransparentActive: nt,
  colorBackgroundInteractiveDisabled: tt,
  colorBackgroundInteractiveReadOnly: pt,
  colorBackgroundInteractiveInactive: st,
  colorBackgroundInteractiveDestructive: gt,
  colorBackgroundInteractiveDestructiveHover: dt,
  colorBackgroundInteractiveDestructiveActive: Bt,
  colorBackgroundInteractiveAutoFill: zo,
  colorBackgroundInteractivePrimaryNegative: Uo,
  colorBackgroundInteractivePrimaryHoverNegative: Xo,
  colorBackgroundInteractivePrimaryActiveNegative: Yo,
  colorBackgroundInteractiveExpressiveNegative: rt,
  colorBackgroundInteractiveExpressiveHoverNegative: et,
  colorBackgroundInteractiveExpressiveActiveNegative: ot,
  colorBackgroundInteractiveTransparentHoverNegative: ut,
  colorBackgroundInteractiveTransparentActiveNegative: it,
  colorBackgroundInteractiveDisabledNegative: at,
  colorBackgroundInteractiveInactiveNegative: lt,
  colorBackgroundInteractiveReadOnlyNegative: vt,
  colorBackgroundStatusInfoMedium: St,
  colorBackgroundStatusInfoStrong: Ct,
  colorBackgroundStatusSuccessMedium: It,
  colorBackgroundStatusSuccessStrong: Tt,
  colorBackgroundStatusWarningMedium: Nt,
  colorBackgroundStatusWarningStrong: yt,
  colorBackgroundStatusErrorMedium: xt,
  colorBackgroundStatusErrorStrong: mt,
  colorBackgroundStatusNeutral: $t,
  colorBackgroundStatusSpecial: Pt,
  colorBackgroundStatusAttention: Et,
  colorBackgroundStatusBlackFriday: Ot,
  colorBackgroundStatusSuccessStrongNegative: kt,
  colorBackgroundStatusWarningStrongNegative: bt,
  colorBackgroundStatusErrorStrongNegative: ft,
  colorBackgroundToneOnTonePrimary: At,
  colorBackgroundToneOnToneSecondary: Ht,
  colorBackgroundToneOnToneTertiary: Mt,
  colorBackgroundToneOnToneQuaternary: Wt,
  colorBorderWeak: Rt,
  colorBorderMedium: Dt,
  colorBorderStrong: Ft,
  colorBorderWeakNegative: wt,
  colorBorderMediumNegative: ht,
  colorBorderStrongNegative: Lt,
  colorBorderInteractivePrimary: jt,
  colorBorderInteractivePrimaryHover: zt,
  colorBorderInteractivePrimaryActive: Gt,
  colorBorderInteractiveFocus: Qt,
  colorBorderInteractiveExpressive: Ut,
  colorBorderInteractiveSubtle: Yt,
  colorBorderInteractiveSubtleHover: _t,
  colorBorderInteractiveSelected: Xt,
  colorBorderInteractivePrimaryNegative: qt,
  colorBorderInteractivePrimaryHoverNegative: Jt,
  colorBorderInteractivePrimaryActiveNegative: Kt,
  colorBorderInteractiveSubtleNegative: Zt,
  colorBorderInteractiveSubtleHoverNegative: Vt,
  colorBorderStatusError: ra,
  colorBorderStatusWarning: oa,
  colorBorderStatusInfo: ta,
  colorBorderStatusSuccess: aa,
  colorBorderStatusErrorNegative: ea,
  colorBorderStatusSuccessNegative: ca
}, na = {
  colorBrandDeepPurple: we,
  colorBrandCorePurple: Re,
  colorBrandLightPurple: Le,
  colorBrandDeepBeige: Fe,
  colorBrandBeige: he,
  colorBrandLightBeige: De,
  colorBrandOffBlack: We,
  colorBrandWhite: Me,
  colorTextDefault: He,
  colorTextMedium: Ae,
  colorTextWeak: Oe,
  colorTextDefaultNegative: Ee,
  colorTextMediumNegative: Pe,
  colorTextWeakNegative: $e,
  colorTextInteractivePrimary: be,
  colorTextInteractivePrimaryHover: ye,
  colorTextInteractivePrimaryActive: Ne,
  colorTextInteractiveOnPrimary: fe,
  colorTextInteractiveOnExpressive: me,
  colorTextInteractiveOnExpressiveHover: xe,
  colorTextInteractiveOnExpressiveActive: ke,
  colorTextInteractiveOnDestructive: Te,
  colorTextInteractiveSelected: Ie,
  colorTextInteractivePrimaryNegative: Ce,
  colorTextInteractivePrimaryHoverNegative: Se,
  colorTextInteractivePrimaryActiveNegative: Be,
  colorTextInteractiveOnPrimaryNegative: de,
  colorTextInteractiveOnExpressiveNegative: ge,
  colorTextInteractiveOnExpressiveHoverNegative: ve,
  colorTextInteractiveOnExpressiveActiveNegative: pe,
  colorTextStatusInfoMedium: le,
  colorTextStatusInfoStrong: se,
  colorTextStatusSuccessMedium: ie,
  colorTextStatusSuccessStrong: ne,
  colorTextStatusWarningMedium: ue,
  colorTextStatusWarningStrong: ce,
  colorTextStatusErrorMedium: ae,
  colorTextStatusErrorStrong: te,
  colorTextStatusNeutral: oe,
  colorTextStatusSpecial: ee,
  colorTextStatusAttention: re,
  colorTextStatusDiscount: Vr,
  colorTextStatusBlackFriday: _r,
  colorTextStatusSuccessStrongNegative: Zr,
  colorTextStatusErrorMediumNegative: Yr,
  colorTextStatusErrorStrongNegative: Xr,
  colorTextStatusWarningMediumNegative: Ur,
  colorTextToneOnTonePrimary: Kr,
  colorTextToneOnToneSecondary: Jr,
  colorTextToneOnToneTertiary: Gr,
  colorBackgroundPrimary: zr,
  colorBackgroundSecondary: qr,
  colorBackgroundOnImage: jr,
  colorBackgroundPrimaryNegative: Qr,
  colorBackgroundSecondaryNegative: wr,
  colorBackgroundOnImageNegative: Rr,
  colorBackgroundInteractivePrimary: Lr,
  colorBackgroundInteractivePrimaryHover: Fr,
  colorBackgroundInteractivePrimaryActive: hr,
  colorBackgroundInteractiveExpressive: Dr,
  colorBackgroundInteractiveExpressiveHover: Wr,
  colorBackgroundInteractiveExpressiveActive: Mr,
  colorBackgroundInteractiveTransparentHover: Hr,
  colorBackgroundInteractiveTransparentActive: Ar,
  colorBackgroundInteractiveDisabled: Or,
  colorBackgroundInteractiveReadOnly: Er,
  colorBackgroundInteractiveInactive: Pr,
  colorBackgroundInteractiveDestructive: $r,
  colorBackgroundInteractiveDestructiveHover: br,
  colorBackgroundInteractiveDestructiveActive: yr,
  colorBackgroundInteractiveAutoFill: Nr,
  colorBackgroundInteractivePrimaryNegative: fr,
  colorBackgroundInteractivePrimaryHoverNegative: mr,
  colorBackgroundInteractivePrimaryActiveNegative: xr,
  colorBackgroundInteractiveExpressiveNegative: kr,
  colorBackgroundInteractiveExpressiveHoverNegative: Tr,
  colorBackgroundInteractiveExpressiveActiveNegative: Ir,
  colorBackgroundInteractiveTransparentHoverNegative: Cr,
  colorBackgroundInteractiveTransparentActiveNegative: Sr,
  colorBackgroundInteractiveDisabledNegative: Br,
  colorBackgroundInteractiveInactiveNegative: dr,
  colorBackgroundInteractiveReadOnlyNegative: gr,
  colorBackgroundStatusInfoMedium: vr,
  colorBackgroundStatusInfoStrong: pr,
  colorBackgroundStatusSuccessMedium: lr,
  colorBackgroundStatusSuccessStrong: sr,
  colorBackgroundStatusWarningMedium: ir,
  colorBackgroundStatusWarningStrong: nr,
  colorBackgroundStatusErrorMedium: ur,
  colorBackgroundStatusErrorStrong: cr,
  colorBackgroundStatusNeutral: ar,
  colorBackgroundStatusSpecial: tr,
  colorBackgroundStatusAttention: or,
  colorBackgroundStatusBlackFriday: er,
  colorBackgroundStatusSuccessStrongNegative: rr,
  colorBackgroundStatusWarningStrongNegative: V,
  colorBackgroundStatusErrorStrongNegative: _,
  colorBackgroundToneOnTonePrimary: Z,
  colorBackgroundToneOnToneSecondary: Y,
  colorBackgroundToneOnToneTertiary: X,
  colorBackgroundToneOnToneQuaternary: U,
  colorBorderWeak: K,
  colorBorderMedium: J,
  colorBorderStrong: G,
  colorBorderWeakNegative: z,
  colorBorderMediumNegative: q,
  colorBorderStrongNegative: j,
  colorBorderInteractivePrimary: Q,
  colorBorderInteractivePrimaryHover: w,
  colorBorderInteractivePrimaryActive: R,
  colorBorderInteractiveFocus: L,
  colorBorderInteractiveExpressive: F,
  colorBorderInteractiveSubtle: h,
  colorBorderInteractiveSubtleHover: D,
  colorBorderInteractiveSelected: W,
  colorBorderInteractivePrimaryNegative: M,
  colorBorderInteractivePrimaryHoverNegative: H,
  colorBorderInteractivePrimaryActiveNegative: A,
  colorBorderInteractiveSubtleNegative: O,
  colorBorderInteractiveSubtleHoverNegative: E,
  colorBorderStatusError: P,
  colorBorderStatusWarning: $,
  colorBorderStatusInfo: b,
  colorBorderStatusSuccess: y,
  colorBorderStatusErrorNegative: N,
  colorBorderStatusSuccessNegative: f
}, B = {
  light: na,
  dark: ua
}, ia = ({
  theme: o = B,
  cssVariablesSelector: r,
  currentColorScheme: t
}) => {
  l(() => {
    t && Object.entries(o?.[t] ?? B[t]).forEach(
      ([u, n]) => {
        ((r ? document.querySelector(r) : null) ?? document.documentElement).style.setProperty(
          `--purpur-${m(u)}`,
          n
        );
      }
    );
  }, [o, r, t]);
}, S = T({
  colorScheme: "light",
  currentColorScheme: "light",
  setColorScheme: () => {
  },
  options: {}
}), da = ({
  cssVariablesSelector: o,
  forceColorScheme: r,
  theme: t,
  children: u,
  options: n = {},
  ...p
}) => {
  const [a, i] = d(r ?? "auto"), [c, s] = d(
    r ?? "light"
  );
  l(() => {
    if (r)
      i(r);
    else {
      const e = localStorage.getItem("colorScheme");
      e && i(e);
    }
  }, [r]), l(() => {
    const e = window.matchMedia("(prefers-color-scheme: dark)");
    s(a === "auto" ? e.matches ? "dark" : "light" : a);
    const v = (I) => {
      !r && a === "auto" && s(I.matches ? "dark" : "light");
    };
    return e.addEventListener("change", v), () => {
      e.removeEventListener("change", v);
    };
  }, [a, r]), ia({
    theme: t,
    cssVariablesSelector: o,
    currentColorScheme: t !== void 0 ? c : void 0
  });
  const C = x(
    () => ({
      colorScheme: a,
      currentColorScheme: c,
      setColorScheme: (e) => {
        r || (i(e), localStorage.setItem("colorScheme", e));
      }
    }),
    [a, c, r]
  );
  return /* @__PURE__ */ g(S.Provider, { value: { ...C, options: n }, children: /* @__PURE__ */ g("div", { "data-color-scheme": c, className: c, ...p, children: u }) });
}, Ba = () => {
  const o = k(S);
  if (!o)
    throw new Error("useTheme must be used within a ThemeProvider");
  return o;
};
export {
  da as T,
  ia as a,
  B as t,
  Ba as u
};
//# sourceMappingURL=ThemeProvider-mOHIAi2k.mjs.map
