import { b as e } from "./twind.BiM9xcCd.js";
import { b as t } from "./chroma-js.Dcir27CH.js";
import { kebabCase as n } from "lodash-es";
var r = {
	primary: "Primary color",
	secondary: "Secondary color",
	accent: "Accent color",
	neutral: "Neutral color",
	base100: "Base color",
	base200: "Base (level 2)",
	base300: "Base (level 3)"
}, i = [
	900,
	800,
	700,
	600,
	500,
	400,
	300,
	200,
	100,
	50
], a = {
	100: "subtle",
	300: "light",
	700: "dark"
};
function o(e) {
	return typeof e == "string" ? e.startsWith("oklch") || e.startsWith("oklab") || e.startsWith("rgb") || e.startsWith("hsl") || e.startsWith("#") || e.startsWith("var(--") : !1;
}
function s(t, n) {
	if (!(typeof t > "u")) return o(t) || typeof t == "number" ? e({ [n]: t }) : t;
}
function c(e, n = 3.5) {
	let r = t(e), i = "#ffffff", a = "#000000", o = t.contrast(r, i), s = t.contrast(r, a);
	return o >= n && s >= n || o >= n ? i : s >= n ? a : o >= s ? i : a;
}
function l(e, t) {
	if (!(typeof e > "u")) return o(e) || typeof e == "number" ? `${t}-[${e}]` : e;
}
function u(e) {
	let o = {};
	return Object.keys(r).forEach((r) => {
		let s = e.colors[r], l = n(r);
		o[`color-${l}`] = s, o[`color-${l}-500`] = s;
		let u = c(s);
		o[`color-${l}-content`] = u, o[`color-${l}-500-content`] = u;
		let d = t(s), f = d.darken(2.5), p = d.brighten(3.5), m = t.scale([
			p,
			d,
			f
		]).domain([
			50,
			500,
			900
		]).mode("oklch");
		l.startsWith("base") || i.forEach((e) => {
			if (e === 500) return;
			let t = `color-${l}-${e}`, n = m(e);
			o[t] = n.css("oklch");
			let r = c(n);
			o[`color-${l}-${e}-content`] = r, a[e] && (o[`color-${l}-${a[e]}`] = o[t], o[`color-${l}-${a[e]}-content`] = r);
		});
	}), o;
}
export { s as b, l as c, o as d, c as e, u as f, r as g };

//# sourceMappingURL=color-system.Dp99zR0T.js.map