"use client";
import { CheckIcon } from '@radix-ui/react-icons';
import * as SelectPrimitive from '@radix-ui/react-select';
import { ChevronDown } from 'lucide-react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, jsx } from 'react/jsx-runtime';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
__name(cn, "cn");
var Select = SelectPrimitive.Root;
var SelectGroup = SelectPrimitive.Group;
var SelectValue = SelectPrimitive.Value;
var SelectTrigger = /* @__PURE__ */ __name(({
  className,
  children,
  ...props
}) => /* @__PURE__ */ jsxs(
  SelectPrimitive.Trigger,
  {
    className: cn(
      "h-input border-divider bg-bg-secondary relative flex w-full items-center justify-between rounded-md border px-4 py-2 text-sm shadow-xs",
      "focus:ring-border-input-focus placeholder:text-text-secondary focus:ring-1 focus:outline-hidden focus:ring-inset disabled:cursor-not-allowed disabled:opacity-50",
      "peer/select [&[data-placeholder]>svg]:mt-0",
      "pt-6 data-[placeholder]:pt-2",
      "aria-expanded:ring-border-input-focus aria-expanded:ring-1 aria-expanded:ring-inset",
      className
    ),
    ...props,
    children: [
      children,
      /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "absolute top-[23px] right-3 h-4 w-4 opacity-50" }) })
    ]
  }
), "SelectTrigger");
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
var SelectContent = /* @__PURE__ */ __name(({
  className,
  children,
  position = "popper",
  ...props
}) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
  SelectPrimitive.Content,
  {
    className: cn(
      "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 border-divider bg-bg-dark relative z-50 min-w-[8rem] overflow-hidden rounded-md border text-gray-50/70 shadow-md",
      position === "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",
      className
    ),
    position,
    ...props,
    children: /* @__PURE__ */ jsx(
      SelectPrimitive.Viewport,
      {
        className: cn(
          "p-1",
          position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
        ),
        children
      }
    )
  }
) }), "SelectContent");
SelectContent.displayName = SelectPrimitive.Content.displayName;
var SelectLabel = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsx(
  SelectPrimitive.Label,
  {
    className: cn("px-2 py-1.5 text-sm font-semibold", className),
    ...props
  }
), "SelectLabel");
SelectLabel.displayName = SelectPrimitive.Label.displayName;
var SelectItem = /* @__PURE__ */ __name(({
  className,
  children,
  ...props
}) => /* @__PURE__ */ jsxs(
  SelectPrimitive.Item,
  {
    className: cn(
      "focus:bg-bg-secondary focus:text-text-default relative flex w-full cursor-default items-center rounded-xs py-2 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      className
    ),
    ...props,
    children: [
      /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
      /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
    ]
  }
), "SelectItem");
SelectItem.displayName = SelectPrimitive.Item.displayName;
var SelectSeparator = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsx(
  SelectPrimitive.Separator,
  {
    className: cn("bg-muted -mx-1 my-1 h-px", className),
    ...props
  }
), "SelectSeparator");
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;

export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
