"use client";
import { cn } from "../../lib/utils.js";
import { c } from "react/compiler-runtime";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
import * as SelectPrimitive from "@radix-ui/react-select";
function Select(e) {
	let o = c(4), s;
	o[0] === e ? s = o[1] : ({...s} = e, o[0] = e, o[1] = s);
	let l;
	return o[2] === s ? l = o[3] : (l = /* @__PURE__ */ jsx(SelectPrimitive.Root, {
		"data-slot": "select",
		...s
	}), o[2] = s, o[3] = l), l;
}
function SelectGroup(e) {
	let o = c(4), s;
	o[0] === e ? s = o[1] : ({...s} = e, o[0] = e, o[1] = s);
	let l;
	return o[2] === s ? l = o[3] : (l = /* @__PURE__ */ jsx(SelectPrimitive.Group, {
		"data-slot": "select-group",
		...s
	}), o[2] = s, o[3] = l), l;
}
function SelectValue(e) {
	let o = c(4), s;
	o[0] === e ? s = o[1] : ({...s} = e, o[0] = e, o[1] = s);
	let l;
	return o[2] === s ? l = o[3] : (l = /* @__PURE__ */ jsx(SelectPrimitive.Value, {
		"data-slot": "select-value",
		...s
	}), o[2] = s, o[3] = l), l;
}
function SelectTrigger(s) {
	let u = c(13), d, f, p, m;
	u[0] === s ? (d = u[1], f = u[2], p = u[3], m = u[4]) : ({className: f, size: m, children: d, ...p} = s, u[0] = s, u[1] = d, u[2] = f, u[3] = p, u[4] = m);
	let h = m === void 0 ? "default" : m, g;
	u[5] === f ? g = u[6] : (g = cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit cursor-pointer items-center justify-between gap-2 rounded-md border bg-background px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", f), u[5] = f, u[6] = g);
	let _;
	u[7] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
		asChild: !0,
		children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
	}), u[7] = _) : _ = u[7];
	let v;
	return u[8] !== d || u[9] !== p || u[10] !== h || u[11] !== g ? (v = /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
		"data-slot": "select-trigger",
		"data-size": h,
		className: g,
		...p,
		children: [d, _]
	}), u[8] = d, u[9] = p, u[10] = h, u[11] = g, u[12] = v) : v = u[12], v;
}
function SelectContent(s) {
	let l = c(22), u, d, f, p, m;
	l[0] === s ? (u = l[1], d = l[2], f = l[3], p = l[4], m = l[5]) : ({className: d, children: u, position: p, align: m, ...f} = s, l[0] = s, l[1] = u, l[2] = d, l[3] = f, l[4] = p, l[5] = m);
	let h = p === void 0 ? "popper" : p, g = m === void 0 ? "center" : m, _ = h === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", v;
	l[6] !== d || l[7] !== _ ? (v = cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", _, d), l[6] = d, l[7] = _, l[8] = v) : v = l[8];
	let y;
	l[9] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ jsx(SelectScrollUpButton, {}), l[9] = y) : y = l[9];
	let b = h === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1", x;
	l[10] === b ? x = l[11] : (x = cn("p-1", b), l[10] = b, l[11] = x);
	let S;
	l[12] !== u || l[13] !== x ? (S = /* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
		className: x,
		children: u
	}), l[12] = u, l[13] = x, l[14] = S) : S = l[14];
	let C;
	l[15] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(SelectScrollDownButton, {}), l[15] = C) : C = l[15];
	let w;
	return l[16] !== g || l[17] !== h || l[18] !== f || l[19] !== v || l[20] !== S ? (w = /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
		"data-slot": "select-content",
		className: v,
		position: h,
		align: g,
		...f,
		children: [
			y,
			S,
			C
		]
	}) }), l[16] = g, l[17] = h, l[18] = f, l[19] = v, l[20] = S, l[21] = w) : w = l[21], w;
}
function SelectLabel(o) {
	let s = c(8), l, u;
	s[0] === o ? (l = s[1], u = s[2]) : ({className: l, ...u} = o, s[0] = o, s[1] = l, s[2] = u);
	let d;
	s[3] === l ? d = s[4] : (d = cn("text-muted-foreground px-2 py-1.5 text-xs", l), s[3] = l, s[4] = d);
	let f;
	return s[5] !== u || s[6] !== d ? (f = /* @__PURE__ */ jsx(SelectPrimitive.Label, {
		"data-slot": "select-label",
		className: d,
		...u
	}), s[5] = u, s[6] = d, s[7] = f) : f = s[7], f;
}
function SelectItem(l) {
	let u = c(13), d, f, p;
	u[0] === l ? (d = u[1], f = u[2], p = u[3]) : ({className: f, children: d, ...p} = l, u[0] = l, u[1] = d, u[2] = f, u[3] = p);
	let m;
	u[4] === f ? m = u[5] : (m = cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", f), u[4] = f, u[5] = m);
	let h;
	u[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx("span", {
		className: "absolute right-2 flex size-3.5 items-center justify-center",
		children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
	}), u[6] = h) : h = u[6];
	let g;
	u[7] === d ? g = u[8] : (g = /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: d }), u[7] = d, u[8] = g);
	let _;
	return u[9] !== p || u[10] !== m || u[11] !== g ? (_ = /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
		"data-slot": "select-item",
		className: m,
		...p,
		children: [h, g]
	}), u[9] = p, u[10] = m, u[11] = g, u[12] = _) : _ = u[12], _;
}
function SelectSeparator(o) {
	let s = c(8), l, u;
	s[0] === o ? (l = s[1], u = s[2]) : ({className: l, ...u} = o, s[0] = o, s[1] = l, s[2] = u);
	let d;
	s[3] === l ? d = s[4] : (d = cn("bg-border pointer-events-none -mx-1 my-1 h-px", l), s[3] = l, s[4] = d);
	let f;
	return s[5] !== u || s[6] !== d ? (f = /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
		"data-slot": "select-separator",
		className: d,
		...u
	}), s[5] = u, s[6] = d, s[7] = f) : f = s[7], f;
}
function SelectScrollUpButton(o) {
	let s = c(9), l, d;
	s[0] === o ? (l = s[1], d = s[2]) : ({className: l, ...d} = o, s[0] = o, s[1] = l, s[2] = d);
	let f;
	s[3] === l ? f = s[4] : (f = cn("flex cursor-default items-center justify-center py-1", l), s[3] = l, s[4] = f);
	let p;
	s[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" }), s[5] = p) : p = s[5];
	let m;
	return s[6] !== d || s[7] !== f ? (m = /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
		"data-slot": "select-scroll-up-button",
		className: f,
		...d,
		children: p
	}), s[6] = d, s[7] = f, s[8] = m) : m = s[8], m;
}
function SelectScrollDownButton(o) {
	let s = c(9), u, d;
	s[0] === o ? (u = s[1], d = s[2]) : ({className: u, ...d} = o, s[0] = o, s[1] = u, s[2] = d);
	let f;
	s[3] === u ? f = s[4] : (f = cn("flex cursor-default items-center justify-center py-1", u), s[3] = u, s[4] = f);
	let p;
	s[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" }), s[5] = p) : p = s[5];
	let m;
	return s[6] !== d || s[7] !== f ? (m = /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
		"data-slot": "select-scroll-down-button",
		className: f,
		...d,
		children: p
	}), s[6] = d, s[7] = f, s[8] = m) : m = s[8], m;
}
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
