import { createContext as e, useContext as t } from "react";
import { cn as n } from "@ryuzaki13/react-foundation-lib/utils";
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
var o = {
	detailList: "DyKaN-",
	none: "_2Cf0DN",
	small: "igyZiV",
	normal: "lFsl-5",
	large: "zQlD1x",
	detail: "a6oRih",
	dt: "MYdzIV",
	dd: "Pxw-eb",
	textCenter: "Kz2K6S",
	inline: "Pbwja7",
	start: "_1DseTb",
	center: "h3oORx",
	end: "gB9Kr4",
	noWrap: "V-PlLc"
}, s = e({});
function c({ label: e, value: c, withColon: l, required: u }) {
	let { semantic: d, inline: f, noWrap: p, center: m, vertical: h = "center", withColon: g = !0 } = t(s), _ = n(o.detail, m && o.textCenter, f && o.inline, p && o.noWrap, o[h]), v = /* @__PURE__ */ a(r, { children: [
		e,
		u && /* @__PURE__ */ i("span", {
			className: "statusError",
			children: "*"
		}),
		(typeof l == "boolean" ? l : g) && ":"
	] });
	switch (d) {
		case "detail": return /* @__PURE__ */ a("div", {
			className: _,
			children: [/* @__PURE__ */ i("dt", {
				className: o.dt,
				children: v
			}), /* @__PURE__ */ i("dd", {
				className: o.dd,
				children: c
			})]
		});
		case "list": return /* @__PURE__ */ a("li", {
			className: _,
			children: [/* @__PURE__ */ i("div", {
				className: o.dt,
				children: v
			}), /* @__PURE__ */ i("div", {
				className: o.dd,
				children: c
			})]
		});
		default: return /* @__PURE__ */ a("div", {
			className: _,
			children: [/* @__PURE__ */ i("div", {
				className: o.dt,
				children: v
			}), /* @__PURE__ */ i("div", {
				className: o.dd,
				children: c
			})]
		});
	}
}
var l = ({ children: e, columnCount: t = 1, rowGap: r = "none", semantic: a = "list", className: c, ...l }) => {
	let u = n(o.detailList, o[r], c), d = i(a === "detail" ? "dl" : "ul", {
		className: u,
		style: { columnCount: Math.min(5, Math.max(1, t)) },
		children: e
	});
	return /* @__PURE__ */ i(s.Provider, {
		value: {
			...l,
			semantic: a
		},
		children: d
	});
};
l.Item = c;
//#endregion
export { l as Detail };

//# sourceMappingURL=index.js.map