import { createElement as e, forwardRef as t, useMemo as n } from "react";
import { cn as r } from "@ryuzaki13/react-foundation-lib/utils";
import { jsx as i } from "react/jsx-runtime";
import { resolveProps as a, useMatchMedia as o } from "@ryuzaki13/react-foundation-lib/media";
var s = {
	container: "ZNPIAt",
	inline: "FOfB6f",
	row: "S3zmDT",
	column: "ZFdq8E",
	rowReverse: "VAzJwr",
	columnReverse: "-U1mun",
	wrap: "_4ZMtr-",
	nowrap: "SKOoTV",
	wrapReverse: "sSe6vs",
	alignStart: "_3K-dKm",
	alignCenter: "-Pfy-z",
	alignEnd: "beSYgR",
	alignStretch: "Ewhv1G",
	alignBaseline: "JXvBB6",
	justifyStart: "hN3T0k",
	justifyCenter: "KKCJ5o",
	justifyEnd: "MnX1Le",
	justifyStretch: "Hom9eH",
	justifyBetween: "Oujm4J",
	justifyAround: "_2ttx6l",
	justifyEvenly: "QEwI8b",
	alignContentStart: "_7GQOS7",
	alignContentCenter: "_2IOpAA",
	alignContentEnd: "fZOYKH",
	alignContentStretch: "_01H9Wl",
	alignContentBetween: "GiMq3P",
	alignContentAround: "tfwckC",
	alignContentEvenly: "_9tNYb7",
	gapNone: "PoehYn",
	gapRowXs: "D9yh46",
	gapRowSm: "B5WUhS",
	gapRowMd: "KfUmo4",
	gapRowLg: "m-8JGj",
	gapRowXl: "zFcs1z",
	gapColumnXs: "_0wKkFA",
	gapColumnSm: "VQY6wh",
	gapColumnMd: "csJmh7",
	gapColumnLg: "_-8r3Oj",
	gapColumnXl: "sCELJe",
	gapXs: "NrH1WE",
	gapSm: "IIgbrj",
	gapMd: "alT7CJ",
	gapLg: "TBFK23",
	gapXl: "JR1URZ",
	item: "i1imd3",
	grow: "IVZ-ii",
	grow0: "zhghPS",
	shrink: "-A4gJM",
	shrink0: "_3Q-lT-",
	basis0: "YSg8P9",
	basisAuto: "RMXnTk",
	flex0: "YyYE7z",
	flex1: "LD3bM5",
	alignSelfStart: "HpcoTp",
	alignSelfCenter: "E7ItD3",
	alignSelfEnd: "v0JFEC",
	alignSelfStretch: "pmMEmH",
	alignSelfBaseline: "qevFHG",
	justifySelfCenter: "OTPY33",
	justifySelfEnd: "AjRxTP",
	justifySelfStretch: "_1YaZWf",
	center: "H-DHBq",
	columnCenter: "JzIGGJ",
	centerBetween: "aqYTBq"
}, c = (e) => n(() => {
	let t = [s.container];
	return e.inline && t.push(s.inline), e.row ? t.push(s.row) : e.column ? t.push(s.column) : e.rowReverse ? t.push(s.rowReverse) : e.columnReverse && t.push(s.columnReverse), e.wrap ? t.push(s.wrap) : e.nowrap ? t.push(s.nowrap) : e.wrapReverse && t.push(s.wrapReverse), e.align && t.push(s[`align${e.align.charAt(0).toUpperCase() + e.align.slice(1)}`]), e.justify && t.push(s[`justify${e.justify.charAt(0).toUpperCase() + e.justify.slice(1)}`]), e.alignContent && t.push(s[`alignContent${e.alignContent.charAt(0).toUpperCase() + e.alignContent.slice(1)}`]), e.gap === "none" ? t.push(s.gapNone) : e.gap && t.push(s[`gap${e.gap.charAt(0).toUpperCase() + e.gap.slice(1)}`]), e.gapRow && t.push(s[`gapRow${e.gapRow.charAt(0).toUpperCase() + e.gapRow.slice(1)}`]), e.gapColumn && t.push(s[`gapColumn${e.gapColumn.charAt(0).toUpperCase() + e.gapColumn.slice(1)}`]), t.filter(Boolean).join(" ");
}, [e]), l = (e) => n(() => {
	let t = [s.item];
	return e.flex0 && t.push(s.flex0), e.flex1 && t.push(s.flex1), !e.flex0 && !e.flex1 && (e.grow ? t.push(s.grow) : t.push(s.grow0), e.shrink === !1 ? t.push(s.shrink0) : t.push(s.shrink), e.basis === "0" ? t.push(s.basis0) : e.basis === "auto" && t.push(s.basisAuto)), e.alignSelf && t.push(s[`alignSelf${e.alignSelf.charAt(0).toUpperCase() + e.alignSelf.slice(1)}`]), e.justifySelf && t.push(s[`justifySelf${e.justifySelf.charAt(0).toUpperCase() + e.justifySelf.slice(1)}`]), t.filter(Boolean).join(" ");
}, [e]), u = (e) => s[e], d = [
	"inline",
	"row",
	"column",
	"rowReverse",
	"columnReverse",
	"wrap",
	"nowrap",
	"wrapReverse",
	"align",
	"justify",
	"alignContent",
	"gap",
	"gapRow",
	"gapColumn"
], f = t(({ children: t, className: r = "", as: i, style: s, inline: l, row: u, column: f, rowReverse: p, columnReverse: m, wrap: h, nowrap: g, wrapReverse: _, align: v, justify: y, alignContent: b, gap: x, gapRow: S, gapColumn: C, ...w }, T) => {
	let { activeBreakpoint: E } = o(), D = [c(n(() => a({
		inline: l,
		row: u,
		column: f,
		rowReverse: p,
		columnReverse: m,
		wrap: h,
		nowrap: g,
		wrapReverse: _,
		align: v,
		justify: y,
		alignContent: b,
		gap: x,
		gapRow: S,
		gapColumn: C
	}, E, d), [
		E,
		v,
		b,
		f,
		m,
		x,
		C,
		S,
		l,
		y,
		g,
		u,
		p,
		h,
		_
	])), r].filter(Boolean).join(" ");
	return e(i || "div", {
		...w,
		ref: T,
		className: D,
		style: s
	}, t);
});
f.displayName = "FlexContainer";
//#endregion
//#region src/flex/FlexItem.tsx
var p = [
	"flex0",
	"flex1",
	"grow",
	"shrink",
	"basis",
	"alignSelf",
	"justifySelf"
], m = t(({ children: t, className: r = "", as: i, style: s, flex0: c, flex1: u, grow: d, shrink: f, basis: m, alignSelf: h, justifySelf: g, ..._ }, v) => {
	let { activeBreakpoint: y } = o(), b = [l(n(() => a({
		flex0: c,
		flex1: u,
		grow: d,
		shrink: f,
		basis: m,
		alignSelf: h,
		justifySelf: g
	}, y, p), [
		y,
		h,
		m,
		c,
		u,
		d,
		g,
		f
	])), r].filter(Boolean).join(" ");
	return e(i || "div", {
		..._,
		ref: v,
		className: b,
		style: s
	}, t);
});
m.displayName = "FlexItem";
//#endregion
//#region src/flex/PredefinedFlex.tsx
var h = t(({ variant: e, children: t, className: n = "", ...r }, a) => {
	let o = [u(e ?? ""), n].filter(Boolean).join(" ");
	return /* @__PURE__ */ i(f, {
		ref: a,
		className: o,
		...r,
		children: t
	});
});
h.displayName = "PredefinedFlex";
//#endregion
//#region src/flex/Flex.tsx
var g = {
	Container: f,
	Item: m,
	Predefined: h
}, _ = ({ className: e, minHeight: t, children: n, style: a, ...o }) => {
	let s = t === void 0 ? a : {
		...a,
		minHeight: t
	};
	return /* @__PURE__ */ i("div", {
		...o,
		className: r("flexCenter h100", e),
		style: s,
		children: n
	});
}, v = t((e, t) => /* @__PURE__ */ i(m, {
	...e,
	ref: t,
	flex1: !0
}));
v.displayName = "FlexSpacer";
//#endregion
export { m as a, h as i, _ as n, f as o, g as r, v as t };

//# sourceMappingURL=flex-C7njxZ74.js.map