import { t as e } from "./utils-B7XIe3qq.js";
import { a as t, o as n, t as r } from "./dist-koa_pEtu.js";
import { t as i } from "./dist-CpMqmV-i.js";
import { t as a } from "./dist-C0wG5dwG.js";
import { t as o } from "./dist-DxtM7vvP.js";
import { t as s } from "./dist-CVCn7F_m.js";
import { n as c, r as l, t as u } from "./dist-B1veE5DO.js";
import * as d from "react";
import { jsx as f } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-tabs/dist/index.mjs
var p = "Tabs", [m, h] = t(p, [l]), g = l(), [_, v] = m(p), y = d.forwardRef((e, t) => {
	let { __scopeTabs: n, value: o, onValueChange: c, defaultValue: l, orientation: u = "horizontal", dir: d, activationMode: m = "automatic", ...h } = e, g = s(d), [v, y] = a({
		prop: o,
		onChange: c,
		defaultProp: l ?? "",
		caller: p
	});
	return /* @__PURE__ */ f(_, {
		scope: n,
		baseId: i(),
		value: v,
		onValueChange: y,
		orientation: u,
		dir: g,
		activationMode: m,
		children: /* @__PURE__ */ f(r.div, {
			dir: g,
			"data-orientation": u,
			...h,
			ref: t
		})
	});
});
y.displayName = p;
var b = "TabsList", x = d.forwardRef((e, t) => {
	let { __scopeTabs: n, loop: i = !0, ...a } = e, o = v(b, n);
	return /* @__PURE__ */ f(c, {
		asChild: !0,
		...g(n),
		orientation: o.orientation,
		dir: o.dir,
		loop: i,
		children: /* @__PURE__ */ f(r.div, {
			role: "tablist",
			"aria-orientation": o.orientation,
			...a,
			ref: t
		})
	});
});
x.displayName = b;
var S = "TabsTrigger", C = d.forwardRef((e, t) => {
	let { __scopeTabs: i, value: a, disabled: o = !1, ...s } = e, c = v(S, i), l = g(i), d = E(c.baseId, a), p = D(c.baseId, a), m = a === c.value;
	return /* @__PURE__ */ f(u, {
		asChild: !0,
		...l,
		focusable: !o,
		active: m,
		children: /* @__PURE__ */ f(r.button, {
			type: "button",
			role: "tab",
			"aria-selected": m,
			"aria-controls": p,
			"data-state": m ? "active" : "inactive",
			"data-disabled": o ? "" : void 0,
			disabled: o,
			id: d,
			...s,
			ref: t,
			onMouseDown: n(e.onMouseDown, (e) => {
				!o && e.button === 0 && e.ctrlKey === !1 ? c.onValueChange(a) : e.preventDefault();
			}),
			onKeyDown: n(e.onKeyDown, (e) => {
				[" ", "Enter"].includes(e.key) && c.onValueChange(a);
			}),
			onFocus: n(e.onFocus, () => {
				let e = c.activationMode !== "manual";
				!m && !o && e && c.onValueChange(a);
			})
		})
	});
});
C.displayName = S;
var w = "TabsContent", T = d.forwardRef((e, t) => {
	let { __scopeTabs: n, value: i, forceMount: a, children: s, ...c } = e, l = v(w, n), u = E(l.baseId, i), p = D(l.baseId, i), m = i === l.value, h = d.useRef(m);
	return d.useEffect(() => {
		let e = requestAnimationFrame(() => h.current = !1);
		return () => cancelAnimationFrame(e);
	}, []), /* @__PURE__ */ f(o, {
		present: a || m,
		children: ({ present: n }) => /* @__PURE__ */ f(r.div, {
			"data-state": m ? "active" : "inactive",
			"data-orientation": l.orientation,
			role: "tabpanel",
			"aria-labelledby": u,
			hidden: !n,
			id: p,
			tabIndex: 0,
			...c,
			ref: t,
			style: {
				...e.style,
				animationDuration: h.current ? "0s" : void 0
			},
			children: n && s
		})
	});
});
T.displayName = w;
function E(e, t) {
	return `${e}-trigger-${t}`;
}
function D(e, t) {
	return `${e}-content-${t}`;
}
var O = y, k = x, A = C, j = T;
//#endregion
//#region src/react/primitives/tabs.tsx
function M({ className: t, ...n }) {
	return /* @__PURE__ */ f(O, {
		"data-slot": "tabs",
		className: e("flex flex-col gap-2", t),
		...n
	});
}
function N({ className: t, ...n }) {
	return /* @__PURE__ */ f(k, {
		"data-slot": "tabs-list",
		className: e("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1", t),
		...n
	});
}
function P({ className: t, ...n }) {
	return /* @__PURE__ */ f(A, {
		"data-slot": "tabs-trigger",
		className: e("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
		...n
	});
}
function F({ className: t, ...n }) {
	return /* @__PURE__ */ f(j, {
		"data-slot": "tabs-content",
		className: e("flex-1 outline-none", t),
		...n
	});
}
//#endregion
export { P as i, F as n, N as r, M as t };

//# sourceMappingURL=tabs-BT2WAQcK.js.map