import "../../../../../node_modules/.pnpm/chroma-js@3.1.2/node_modules/chroma-js/index.js";
import { kebabCase as d } from "lodash-es";
import { css as g } from "../../../../style-system/dist/twind.js";
import n from "../../../../../node_modules/.pnpm/chroma-js@3.1.2/node_modules/chroma-js/src/chroma.js";
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
var k = { primary: "Primary color", secondary: "Secondary color", accent: "Accent color", neutral: "Neutral color", base100: "Base color", base200: "Base (level 2)", base300: "Base (level 3)" }, C = [900, 800, 700, 600, 500, 400, 300, 200, 100, 50], i = { 100: "subtle", 300: "light", 700: "dark" };
function m(r) {
  return typeof r != "string" ? !1 : r.startsWith("oklch") || r.startsWith("oklab") || r.startsWith("rgb") || r.startsWith("hsl") || r.startsWith("#") || r.startsWith("var(--");
}
function E(r, o) {
  if (!(typeof r > "u")) return m(r) || typeof r == "number" ? g({ [o]: r }) : r;
}
function b(r, o = 3.5) {
  let l = n(r), t = "#ffffff", e = "#000000", c = n.contrast(l, t), a = n.contrast(l, e);
  return c >= o && a >= o || c >= o ? t : a >= o ? e : c >= a ? t : e;
}
function S(r, o) {
  if (!(typeof r > "u")) return m(r) || typeof r == "number" ? `${o}-[${r}]` : r;
}
function T(r) {
  let o = {};
  return Object.keys(k).forEach((l) => {
    let t = r.colors[l], e = d(l);
    o[`color-${e}`] = t, o[`color-${e}-500`] = t;
    let c = b(t);
    o[`color-${e}-content`] = c, o[`color-${e}-500-content`] = c;
    let a = n(t), p = a.darken(2.5), $ = a.brighten(3.5), y = n.scale([$, a, p]).domain([50, 500, 900]).mode("oklch");
    e.startsWith("base") || C.forEach((s) => {
      if (s === 500) return;
      let f = `color-${e}-${s}`, u = y(s);
      o[f] = u.css("oklch");
      let h = b(u);
      o[`color-${e}-${s}-content`] = h, i[s] && (o[`color-${e}-${i[s]}`] = o[f], o[`color-${e}-${i[s]}-content`] = h);
    });
  }), o;
}
export {
  k as baseColors,
  n as chroma,
  T as generateColorsVars,
  b as getContrastingTextColor,
  m as isStandardColor,
  S as propToClass,
  E as propToStyle,
  C as shadeNumbers
};
//# sourceMappingURL=color-system.js.map
