import { j as e } from "../../node_modules/react/jsx-runtime.js";
import * as o from "react";
import { Trigger as l, Icon as h, ScrollUpButton as n, ScrollDownButton as i, Portal as y, Content as f, Viewport as w, Label as m, Item as p, ItemIndicator as N, ItemText as j, Separator as x, Root as g, Group as S, Value as v } from "../../node_modules/@radix-ui/react-select/dist/index.js";
import { cn as r } from "../../utils/index.js";
import { Icon as d } from "../Icon/index.js";
const G = g, L = S, U = v, R = o.forwardRef(({ className: t, children: s, ...a }, c) => /* @__PURE__ */ e.jsxs(
  l,
  {
    ref: c,
    className: r(
      "flex h-10 w-full items-center justify-between rounded-md border border-interaction-sub-border-default bg-surface-alt px-4 py-3 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
      t
    ),
    ...a,
    children: [
      s,
      /* @__PURE__ */ e.jsx(h, { asChild: !0, children: /* @__PURE__ */ e.jsx(d, { name: "chevron-down", className: "h-4 w-4 opacity-50" }) })
    ]
  }
));
R.displayName = l.displayName;
const u = o.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
  n,
  {
    ref: a,
    className: r(
      "flex cursor-default items-center justify-center py-1",
      t
    ),
    ...s,
    children: /* @__PURE__ */ e.jsx(d, { name: "chevron-up", className: "h-4 w-4" })
  }
));
u.displayName = n.displayName;
const $ = o.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
  i,
  {
    ref: a,
    className: r(
      "flex cursor-default items-center justify-center py-1",
      t
    ),
    ...s,
    children: /* @__PURE__ */ e.jsx(d, { name: "chevron-down", className: "h-4 w-4" })
  }
));
$.displayName = i.displayName;
const I = o.forwardRef(({ className: t, children: s, position: a = "popper", ...c }, b) => /* @__PURE__ */ e.jsx(y, { children: /* @__PURE__ */ e.jsxs(
  f,
  {
    ref: b,
    className: r(
      "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-interaction-sub-border-default bg-brand-white shadow-md 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",
      a === "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",
      t
    ),
    position: a,
    ...c,
    children: [
      /* @__PURE__ */ e.jsx(u, {}),
      /* @__PURE__ */ e.jsx(
        w,
        {
          className: r(
            a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
          ),
          children: s
        }
      ),
      /* @__PURE__ */ e.jsx($, {})
    ]
  }
) }));
I.displayName = f.displayName;
const B = o.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
  m,
  {
    ref: a,
    className: r("py-1.5 pl-8 pr-2 text-sm font-semibold", t),
    ...s
  }
));
B.displayName = m.displayName;
const z = o.forwardRef(({ className: t, children: s, ...a }, c) => /* @__PURE__ */ e.jsxs(
  p,
  {
    ref: c,
    className: r(
      "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-interaction-muted-brand-active data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      t
    ),
    ...a,
    children: [
      /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(d, { name: "check", className: "h-4 w-4" }) }) }),
      /* @__PURE__ */ e.jsx(j, { children: s })
    ]
  }
));
z.displayName = p.displayName;
const C = o.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
  x,
  {
    ref: a,
    className: r("-mx-1 my-1 h-px bg-muted", t),
    ...s
  }
));
C.displayName = x.displayName;
export {
  G as Select,
  I as SelectContent,
  L as SelectGroup,
  z as SelectItem,
  B as SelectLabel,
  $ as SelectScrollDownButton,
  u as SelectScrollUpButton,
  C as SelectSeparator,
  R as SelectTrigger,
  U as SelectValue
};
