import { createElement as e, forwardRef as t, useMemo as n } from "react";
import { resolveResponsiveValue as r, useMatchMedia as i } from "@ryuzaki13/react-foundation-lib/media";
var a = {
	grid: "_5Z2YQF",
	inline: "gAEXju",
	row: "KdmGbk",
	column: "uOpH1m",
	dense: "EOUgpE",
	gapNone: "PoMD0P",
	gapRowXs: "FBebhA",
	gapRowSm: "rwvhfS",
	gapRowMd: "ZIsGgj",
	gapRowLg: "lbAie9",
	gapRowXl: "ylmmN3",
	gapColumnXs: "Fg86QU",
	gapColumnSm: "_3qWtbZ",
	gapColumnMd: "gIXZ8P",
	gapColumnLg: "xXxHZM",
	gapColumnXl: "zRgpft",
	gapXs: "Fb1W2U",
	gapSm: "_2EojT9",
	gapMd: "gYCGa5",
	gapLg: "JN0CZr",
	gapXl: "_2QvtUb",
	alignStart: "_1kRriS",
	alignCenter: "ocLWZU",
	alignEnd: "TS1qri",
	alignStretch: "FXfvI7",
	alignBaseline: "biKmzi",
	justifyStart: "_4-sIS7",
	justifyCenter: "lbdoyi",
	justifyEnd: "WvAC9I",
	justifyStretch: "LN4Ak-",
	alignContentStart: "XC0FuJ",
	alignContentCenter: "_6b9wZI",
	alignContentEnd: "KevE4M",
	alignContentStretch: "Sn-je4",
	alignContentBetween: "Wnx9iF",
	alignContentAround: "RAoqm2",
	alignContentEvenly: "nUjbmv",
	justifyContentStart: "TjTsA7",
	justifyContentCenter: "VdpzYk",
	justifyContentEnd: "peszxb",
	justifyContentStretch: "E98bqx",
	justifyContentBetween: "CdaBbu",
	justifyContentAround: "leVL0N",
	justifyContentEvenly: "_6mOZVj",
	item: "XHgjM3",
	areaAuto: "wtrn5A",
	alignSelfStart: "LkIh-N",
	alignSelfCenter: "Vhdvpo",
	alignSelfEnd: "cyg2du",
	alignSelfStretch: "Ptd1ad",
	alignSelfBaseline: "Z22Yty",
	justifySelfStart: "gycEgN",
	justifySelfCenter: "s69iy2",
	justifySelfEnd: "pKEJ9k",
	justifySelfStretch: "qWkZVw",
	autoRows1fr: "gUbUDY",
	columnsAuto1fr: "S0HulN",
	singleColumn: "K2fFKT"
}, o = (e) => n(() => {
	let t = [a.grid];
	return e.inline && t.push(a.inline), e.column ? t.push(a.column) : e.dense ? t.push(a.dense) : e.row && t.push(a.row), e.align && t.push(a[`align${e.align.charAt(0).toUpperCase() + e.align.slice(1)}`]), e.justify && t.push(a[`justify${e.justify.charAt(0).toUpperCase() + e.justify.slice(1)}`]), e.justifyContent && t.push(a[`justifyContent${e.justifyContent.charAt(0).toUpperCase() + e.justifyContent.slice(1)}`]), e.alignContent && t.push(a[`alignContent${e.alignContent.charAt(0).toUpperCase() + e.alignContent.slice(1)}`]), e.gap === "none" ? t.push(a.gapNone) : e.gap && t.push(a[`gap${e.gap.charAt(0).toUpperCase() + e.gap.slice(1)}`]), e.gapRow && t.push(a[`gapRow${e.gapRow.charAt(0).toUpperCase() + e.gapRow.slice(1)}`]), e.gapColumn && t.push(a[`gapColumn${e.gapColumn.charAt(0).toUpperCase() + e.gapColumn.slice(1)}`]), e.variant === "single-column" ? t.push(a.singleColumn) : e.variant === "auto-1fr" ? t.push(a.autoRows1fr) : e.variant === "auto1fr-rows-auto" && t.push(a.columnsAuto1fr), t.filter(Boolean).join(" ");
}, [e]), s = (e) => n(() => {
	let t = {};
	return e.templateColumns && (t.gridTemplateColumns = e.templateColumns), e.templateRows && (t.gridTemplateRows = e.templateRows), e.autoColumns && (t.gridAutoColumns = e.autoColumns), e.autoRows && (t.gridAutoRows = e.autoRows), e.areas && (t.gridTemplateAreas = e.areas), t;
}, [
	e.templateColumns,
	e.templateRows,
	e.autoColumns,
	e.autoRows,
	e.areas
]), c = (e) => n(() => {
	let t = [a.item];
	return e.alignSelf && t.push(a[`alignSelf${e.alignSelf.charAt(0).toUpperCase() + e.alignSelf.slice(1)}`]), e.justifySelf && t.push(a[`justifySelf${e.justifySelf.charAt(0).toUpperCase() + e.justifySelf.slice(1)}`]), t.filter(Boolean).join(" ");
}, [e]), l = (e) => n(() => {
	let t = {};
	return e.area && (t.gridArea = e.area), e.column && (t.gridColumn = e.column), e.row && (t.gridRow = e.row), t;
}, [
	e.area,
	e.column,
	e.row
]), u = t(({ children: t, className: a = "", as: c, style: l, inline: u, row: d, column: f, dense: p, gap: m, gapRow: h, gapColumn: g, align: _, justify: v, alignContent: y, justifyContent: b, templateColumns: x, templateRows: S, autoColumns: C, autoRows: w, areas: T, variant: E, ...D }, O) => {
	let { activeBreakpoint: k } = i(), A = n(() => ({
		inline: r(u, k),
		row: r(d, k),
		column: r(f, k),
		dense: r(p, k),
		gap: r(m, k),
		gapRow: r(h, k),
		gapColumn: r(g, k),
		align: r(_, k),
		justify: r(v, k),
		alignContent: r(y, k),
		justifyContent: r(b, k),
		variant: r(E, k)
	}), [
		k,
		_,
		y,
		f,
		p,
		m,
		g,
		h,
		u,
		v,
		b,
		d,
		E
	]), j = n(() => ({
		templateColumns: r(x, k),
		templateRows: r(S, k),
		autoColumns: r(C, k),
		autoRows: r(w, k),
		areas: r(T, k)
	}), [
		k,
		x,
		S,
		C,
		w,
		T
	]), M = o(A), N = s(j), P = [M, a].filter(Boolean).join(" "), F = {
		...N,
		...l
	};
	return e(c || "div", {
		...D,
		ref: O,
		className: P,
		style: F
	}, t);
});
u.displayName = "GridContainer";
//#endregion
//#region src/grid/GridItem.tsx
var d = t(({ children: t, className: a = "", as: o, style: s, area: u, column: d, row: f, alignSelf: p, justifySelf: m, ...h }, g) => {
	let { activeBreakpoint: _ } = i(), v = n(() => ({
		alignSelf: r(p, _),
		justifySelf: r(m, _)
	}), [
		_,
		p,
		m
	]), y = n(() => ({
		area: r(u, _),
		column: r(d, _),
		row: r(f, _)
	}), [
		_,
		u,
		d,
		f
	]), b = c(v), x = l(y), S = [b, a].filter(Boolean).join(" "), C = {
		...x,
		...s
	};
	return e(o || "div", {
		...h,
		ref: g,
		className: S,
		style: C
	}, t);
});
d.displayName = "GridItem";
//#endregion
//#region src/grid/Grid.tsx
var f = {
	Container: u,
	Item: d
};
//#endregion
export { d as n, u as r, f as t };

//# sourceMappingURL=grid-dI94AAbi.js.map