'use client';

import { cn } from "../../utils/cn.mjs";
import { Search } from "lucide-react";
import { jsx, jsxs } from "react/jsx-runtime";
import { Dialog, DialogContent } from "@radix-ui/react-dialog";
import { Command as Command$1 } from "cmdk";

//#region src/components/Command/index.tsx
const CommandRoot = ({ className, ...props }) => /* @__PURE__ */ jsx(Command$1, {
	className: cn("flex flex-col overflow-hidden rounded-md", className),
	...props
});
const CommandDialog = ({ children, ...props }) => /* @__PURE__ */ jsx(Dialog, {
	...props,
	children: /* @__PURE__ */ jsx(DialogContent, {
		className: "overflow-hidden p-0",
		children: /* @__PURE__ */ jsx(CommandRoot, {
			className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5",
			children
		})
	})
});
const CommandInput = ({ className, ...props }) => /* @__PURE__ */ jsxs("div", {
	className: "flex w-full items-center",
	"cmdk-input-wrapper": "",
	children: [/* @__PURE__ */ jsx(Search, { className: "mr-2 size-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
		className: cn("flex w-full rounded-md bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
		...props
	})]
});
const CommandList = ({ className, ...props }) => /* @__PURE__ */ jsx(Command$1.List, {
	className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
	...props
});
const CommandEmpty = (props) => /* @__PURE__ */ jsx(Command$1.Empty, {
	className: "py-6 text-center text-sm",
	...props
});
const CommandGroup = ({ className, ...props }) => /* @__PURE__ */ jsx(Command$1.Group, {
	className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs", className),
	...props
});
const CommandSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(Command$1.Separator, {
	className: cn("-mx-1 h-px bg-border", className),
	...props
});
const CommandItem = ({ className, ...props }) => /* @__PURE__ */ jsx(Command$1.Item, {
	className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50", className),
	...props
});
const CommandShortcut = ({ className, ...props }) => {
	return /* @__PURE__ */ jsx("span", {
		className: cn("ml-auto text-muted-foreground text-xs tracking-widest", className),
		...props
	});
};
/**
* Usage example:
* ```jsx
* <Command>
*   <Command.Trigger>
*     <Command.Input placeholder="Search..." />
*   </Command.Trigger>
*   <Command.Dialog>
*     <Command.List>
*       <Command.Item>Item 1</Command.Item>
*       <Command.Item>Item 2</Command.Item>
*       <Command.Item>Item 3</Command.Item>
*     </Command.List>
*   </Command.Dialog>
* </Command>
* ```
*/
const Command = {
	...CommandRoot,
	Dialog: CommandDialog,
	Input: CommandInput,
	List: CommandList,
	Empty: CommandEmpty,
	Group: CommandGroup,
	Separator: CommandSeparator,
	Item: CommandItem,
	Shortcut: CommandShortcut
};

//#endregion
export { Command, CommandRoot };
//# sourceMappingURL=index.mjs.map