import { jsxs as i, jsx as e } from "react/jsx-runtime";
import { Fragment as b } from "react";
import { Root as y, Value as x, Group as w, Trigger as d, Icon as N, Portal as z, Content as c, Viewport as S, Item as p, ItemIndicator as C, ItemText as I, ScrollUpButton as m, ScrollDownButton as u, Label as f } from "@radix-ui/react-select";
import l from "../icon/Icon.js";
import { c as s } from "../../index-BtlgVD4m.js";
const F = y, R = w, $ = x, j = ({
  ref: a,
  className: t,
  children: r,
  size: o = "default",
  ...n
}) => /* @__PURE__ */ i(
  d,
  {
    ref: a,
    className: s(
      "group flex items-center justify-between w-full whitespace-nowrap border ring-offset-2 ring-offset-[var(--base-background)] focus:outline-none focus:ring-1 focus:ring-[var(--base-ring)] disabled:cursor-not-allowed [&>span]:line-clamp-1",
      "h-[var(--height-h-10)]",
      "px-[var(--spacing-3)]",
      "py-[var(--spacing-2)]",
      "bg-[var(--base-background)]",
      "border-[var(--base-input)]",
      "rounded-[var(--border-radius-md)]",
      "text-[var(--base-foreground)]",
      "text-[length:var(--typography-base-sizes-small-font-size)]",
      "placeholder:text-[var(--base-foreground)]",
      "disabled:opacity-[var(--opacity-opacity-50)]",
      !n.disabled && "hover:cursor-pointer",
      o === "sm" && "h-[var(--height-h-9)]",
      t
    ),
    ...n,
    children: [
      r,
      /* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ e(l, { name: "ChevronDown", size: 16, className: "transition-transform group-data-[state=open]:rotate-180" }) })
    ]
  }
);
j.displayName = d.displayName;
const g = ({ ref: a, className: t, ...r }) => /* @__PURE__ */ e(
  m,
  {
    ref: a,
    className: s(
      "absolute",
      "bg-[var(--base-popover)]",
      "left-0 right-0 top-0 z-10 flex cursor-default items-center justify-center",
      "py-[var(--spacing-1)]",
      // 'bg-gradient-to-b from-popover to-transparent',
      "text-[var(--base-foreground)]",
      t
    ),
    ...r,
    children: /* @__PURE__ */ e(l, { name: "ChevronUp", size: 16 })
  }
);
g.displayName = m.displayName;
const v = ({ ref: a, className: t, ...r }) => /* @__PURE__ */ e(
  u,
  {
    ref: a,
    className: s(
      "absolute",
      "bg-[var(--base-popover)]",
      "bottom-0 left-0 right-0 z-10 flex cursor-default items-center justify-center",
      "py-[var(--spacing-1)]",
      // 'bg-gradient-to-t from-popover to-transparent',
      "text-[var(--base-foreground)]",
      t
    ),
    ...r,
    children: /* @__PURE__ */ e(l, { name: "ChevronDown", size: 16 })
  }
);
v.displayName = u.displayName;
const k = ({
  ref: a,
  className: t,
  children: r,
  position: o = "popper",
  isPortal: n = !0,
  ...h
}) => /* @__PURE__ */ e(n ? z : b, { children: /* @__PURE__ */ i(
  c,
  {
    ref: a,
    className: s(
      "relative",
      "z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-[var(--base-popover)] text-popover-foreground 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",
      o === "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: o,
    ...h,
    children: [
      /* @__PURE__ */ e(g, {}),
      /* @__PURE__ */ e(
        S,
        {
          className: s(
            "p-[var(--spacing-1)]",
            o === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
          ),
          children: r
        }
      ),
      /* @__PURE__ */ e(v, {})
    ]
  }
) });
k.displayName = c.displayName;
const B = ({ ref: a, className: t, children: r, ...o }) => /* @__PURE__ */ i(
  f,
  {
    ref: a,
    className: s(
      "py-[var(--spacing-1-5)]",
      "flex px-[var(--spacing-2)]",
      "font-[var(--font-weight-semibold)]",
      "text-[var(--base-foreground)]",
      "text-[length:var(--typography-base-sizes-small-font-size)]",
      t
    ),
    ...o,
    children: [
      /* @__PURE__ */ e("div", { className: "h-[var(--height-h-3-5)] w-[var(--width-w-4)]", children: " " }),
      r
    ]
  }
);
B.displayName = f.displayName;
const D = ({ ref: a, className: t, children: r, ...o }) => /* @__PURE__ */ i(
  p,
  {
    ref: a,
    className: s(
      "relative flex cursor-default select-none items-center outline-none focus:bg-accent focus:text-accent-foreground",
      "px-[var(--spacing-1)]",
      "py-[var(--spacing-1)]",
      "text-[var(--base-foreground)]",
      "text-[length:var(--typography-base-sizes-small-font-size)]",
      "rounded-[var(--border-radius-sm)]",
      "hover:rounded-[var(--border-radius-sm)] hover:bg-[var(--base-accent)]",
      "focus:rounded-[var(--border-radius-sm)] focus:bg-[var(--base-accent)]",
      "data-[disabled]:hover:cursor-not-allowed",
      "data-[disabled]:opacity-[var(--opacity-opacity-50)]",
      !o.disabled && "hover:cursor-pointer",
      t
    ),
    ...o,
    children: [
      /* @__PURE__ */ e("span", { className: "flex w-[var(--width-w-5)] items-center justify-center flex-shrink-0 pr-[var(--spacing-1)]", children: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(l, { name: "Check", size: 16 }) }) }),
      /* @__PURE__ */ e(I, { children: r })
    ]
  }
);
D.displayName = p.displayName;
export {
  F as Select,
  k as SelectContent,
  R as SelectGroup,
  D as SelectItem,
  B as SelectLabel,
  v as SelectScrollDownButton,
  g as SelectScrollUpButton,
  j as SelectTrigger,
  $ as SelectValue
};
//# sourceMappingURL=SelectPrimitives.js.map
