import { jsxs as o, jsx as e } from "react/jsx-runtime";
import { cn as i } from "../../utils/cn.js";
import { DropdownMenu as p, DropdownMenuTrigger as s, DropdownMenuContent as l, DropdownMenuItem as h } from "./dropdown.js";
import g from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js";
const b = ({
  selectedOption: t,
  setSelectedOption: m,
  options: a
}) => {
  const n = a.length > 1;
  return /* @__PURE__ */ o(p, { children: [
    /* @__PURE__ */ e(
      s,
      {
        className: "min-w-16 select-none bg-transparent px-2 py-[5px] font-medium text-primary text-xs dark:bg-transparent dark:text-primary-light",
        disabled: !n,
        children: /* @__PURE__ */ o("div", { className: "flex min-w-16 items-center gap-1.5 rounded-lg px-2 py-1 group-hover:bg-primary/10 dark:group-hover:bg-primary-light/10", children: [
          /* @__PURE__ */ e("p", { className: "truncate", children: t }),
          n && /* @__PURE__ */ e(g, { className: "min-w-3", size: 12 })
        ] })
      }
    ),
    /* @__PURE__ */ e(l, { className: "overflow-y-auto border border-stone-200/70 bg-stone-50 dark:border-stone-800/50 dark:bg-[#0F1117]", children: a.map((r, d) => /* @__PURE__ */ e(
      h,
      {
        className: i(
          "rounded-xl py-1.5 text-xs",
          "hover:bg-primary/10 hover:text-primary dark:hover:bg-primary-light/10 dark:hover:text-primary-light",
          r === t && "font-medium text-primary dark:text-primary-light",
          r !== t && "text-stone-500 dark:text-white/50"
        ),
        onSelect: () => m(r),
        children: r
      },
      `Option${d}${r}`
    )) })
  ] });
};
export {
  b as CodeSelectDropdown
};
