"use client";
'use strict';

var cmdk = require('cmdk');
var lucideReact = require('lucide-react');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var DialogPrimitive = require('@radix-ui/react-dialog');
var jsxRuntime = require('react/jsx-runtime');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
__name(cn, "cn");
var Dialog = DialogPrimitive__namespace.Root;
var DialogPortal = DialogPrimitive__namespace.Portal;
var DialogOverlay = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  DialogPrimitive__namespace.Overlay,
  {
    className: cn(
      "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50",
      "bg-bg-dark/90",
      className
    ),
    ...props
  }
), "DialogOverlay");
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
var DialogContent = /* @__PURE__ */ __name(({
  className,
  children,
  showCloseButton = false,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
  /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
  /* @__PURE__ */ jsxRuntime.jsxs(
    DialogPrimitive__namespace.Content,
    {
      className: cn(
        "bg-bg-default 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 border-divider fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
        className
      ),
      ...props,
      children: [
        children,
        /* @__PURE__ */ jsxRuntime.jsxs(
          DialogPrimitive__namespace.Close,
          {
            className: cn(
              "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-text-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
              !showCloseButton && "hidden"
            ),
            children: [
              /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
              /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
            ]
          }
        )
      ]
    }
  )
] }), "DialogContent");
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
var DialogHeader = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  "div",
  {
    className: cn(
      "flex flex-col space-y-1.5 text-center sm:text-left",
      className
    ),
    ...props
  }
), "DialogHeader");
DialogHeader.displayName = "DialogHeader";
var DialogFooter = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  "div",
  {
    className: cn(
      "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
      className
    ),
    ...props
  }
), "DialogFooter");
DialogFooter.displayName = "DialogFooter";
var DialogTitle = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  DialogPrimitive__namespace.Title,
  {
    className: cn(
      "text-lg leading-none font-semibold tracking-tight",
      className
    ),
    ...props
  }
), "DialogTitle");
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
var DialogDescription = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  DialogPrimitive__namespace.Description,
  {
    className: cn("text-text-secondary text-sm", className),
    ...props
  }
), "DialogDescription");
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
var Command = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  cmdk.Command,
  {
    className: cn(
      "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md [&_[cmdk-list]]:scroll-pt-0 [&_[cmdk-list]]:scroll-auto",
      className
    ),
    loop: true,
    ...props
  }
), "Command");
Command.displayName = cmdk.Command.displayName;
var CommandDialog = /* @__PURE__ */ __name(({ children, ...props }) => {
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:text-text-secondary [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
}, "CommandDialog");
var CommandInput = /* @__PURE__ */ __name(({
  className,
  ref,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
  /* @__PURE__ */ jsxRuntime.jsx(
    cmdk.Command.Input,
    {
      className: cn(
        "placeholder:!text-text-placeholder flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
        className
      ),
      ref,
      ...props
    }
  )
] }), "CommandInput");
CommandInput.displayName = cmdk.Command.Input.displayName;
var CommandList = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  cmdk.Command.List,
  {
    className: cn(
      "max-h-[300px] scroll-pt-0 overflow-x-hidden overflow-y-auto scroll-auto",
      className
    ),
    ...props
  }
), "CommandList");
CommandList.displayName = cmdk.Command.List.displayName;
var CommandEmpty = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { className: "py-6 text-center text-sm", ...props }), "CommandEmpty");
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
var CommandGroup = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  cmdk.Command.Group,
  {
    className: cn(
      "text-text-default [&_[cmdk-group-heading]]:text-text-default overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
      className
    ),
    ...props
  }
), "CommandGroup");
CommandGroup.displayName = cmdk.Command.Group.displayName;
var CommandSeparator = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  cmdk.Command.Separator,
  {
    className: cn("bg-divider -mx-1 h-px", className),
    ...props
  }
), "CommandSeparator");
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
var CommandItem = /* @__PURE__ */ __name(({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  cmdk.Command.Item,
  {
    className: cn(
      "hover:bg-bg-secondary data-[selected=true]:text-text-default data-[selected='true']:bg-bg-secondary relative flex cursor-default items-center rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
      className
    ),
    ...props
  }
), "CommandItem");
CommandItem.displayName = cmdk.Command.Item.displayName;
var CommandShortcut = /* @__PURE__ */ __name(({
  className,
  ...props
}) => {
  return /* @__PURE__ */ jsxRuntime.jsx(
    "span",
    {
      className: cn(
        "text-text-secondary ml-auto text-xs tracking-widest",
        className
      ),
      ...props
    }
  );
}, "CommandShortcut");
CommandShortcut.displayName = "CommandShortcut";

exports.Command = Command;
exports.CommandDialog = CommandDialog;
exports.CommandEmpty = CommandEmpty;
exports.CommandGroup = CommandGroup;
exports.CommandInput = CommandInput;
exports.CommandItem = CommandItem;
exports.CommandList = CommandList;
exports.CommandSeparator = CommandSeparator;
exports.CommandShortcut = CommandShortcut;
