{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "command",
  "dependencies": [
    "@data-slot/command"
  ],
  "registryDependencies": [
    "@fulldev/dialog",
    "@fulldev/icon"
  ],
  "files": [
    {
      "path": "src/components/ui/command/command.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  label?: string\n  defaultValue?: string\n  defaultSearch?: string\n  shouldFilter?: boolean\n  loop?: boolean\n  disablePointerSelection?: boolean\n  vimBindings?: boolean\n}\n\nconst {\n  class: className,\n  label,\n  defaultValue,\n  defaultSearch,\n  shouldFilter,\n  loop,\n  disablePointerSelection,\n  vimBindings,\n  ...props\n} = Astro.props\n---\n\n<div\n  data-slot=\"command\"\n  data-label={label}\n  data-default-value={defaultValue}\n  data-default-search={defaultSearch}\n  data-should-filter={shouldFilter}\n  data-loop={loop}\n  data-disable-pointer-selection={disablePointerSelection}\n  data-vim-bindings={vimBindings}\n  class={cn(\n    \"bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</div>\n\n<script>\n  import { create } from \"@data-slot/command\"\n\n  const initCommand = () => {\n    create()\n\n    document.querySelectorAll(\"[data-slot=command]\").forEach((command) => {\n      if (!(command instanceof HTMLElement)) return\n      if (command.dataset.linkNavigation === \"true\") return\n\n      command.dataset.linkNavigation = \"true\"\n      command.addEventListener(\"command:select\", (event) => {\n        const { detail } = event as CustomEvent<{ value?: unknown }>\n        const value = detail?.value\n        if (typeof value !== \"string\") return\n\n        const item = Array.from(\n          command.querySelectorAll(\"[data-slot=command-item][href]\")\n        ).find((item) => item.getAttribute(\"data-value\") === value)\n        const href = item?.getAttribute(\"href\")\n\n        if (href) window.location.href = href\n      })\n    })\n  }\n\n  initCommand()\n\n  document.addEventListener(\"astro:page-load\", initCommand)\n</script>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-dialog.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogTitle,\n} from \"@/components/ui/dialog\"\n\ntype Props = ComponentProps<typeof Dialog> & {\n  title?: string\n  description?: string\n  contentClass?: string\n  showCloseButton?: boolean\n}\n\nconst {\n  title = \"Command Palette\",\n  description = \"Search for a command to run...\",\n  contentClass,\n  showCloseButton = false,\n  ...props\n} = Astro.props\n---\n\n<Dialog {...props}>\n  <DialogContent\n    class:list={[\n      \"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0\",\n      \"**:data-[slot=command]:border-0\",\n      \"**:data-[slot=command]:bg-transparent\",\n      \"**:data-[slot=command-input-wrapper]:h-12\",\n      \"[&_[data-slot=command-input-wrapper]_svg]:size-5\",\n      \"**:data-[slot=command-input]:h-12\",\n      \"**:data-[slot=command-item]:px-2\",\n      \"**:data-[slot=command-item]:py-3\",\n      \"[&_[data-slot=command-item]_svg]:size-5\",\n      \"**:data-[slot=command-group-heading]:text-muted-foreground\",\n      \"**:data-[slot=command-group-heading]:px-2\",\n      \"**:data-[slot=command-group-heading]:font-medium\",\n      \"**:data-[slot=command-group]:px-2\",\n      \"[&_[data-slot=command-group]:not([hidden])_~[data-slot=command-group]]:pt-0\",\n      contentClass,\n    ]}\n    showCloseButton={showCloseButton}\n  >\n    <div class=\"sr-only\">\n      <DialogTitle>{title}</DialogTitle>\n      <DialogDescription>{description}</DialogDescription>\n    </div>\n    <slot />\n  </DialogContent>\n</Dialog>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-input.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Icon } from \"@/components/ui/icon\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n  wrapperClass?: string\n}\n\nconst { class: className, wrapperClass, ...props } = Astro.props\n---\n\n<div data-slot=\"command-input-wrapper\" class={cn(\"p-1 pb-0\", wrapperClass)}>\n  <div\n    class=\"border-input/30 bg-input/30 flex h-8! items-center rounded-lg! border shadow-none!\"\n  >\n    <div class=\"flex items-center pl-2\">\n      <Icon name=\"search\" class=\"size-4 shrink-0 opacity-50\" />\n    </div>\n    <input\n      type=\"text\"\n      data-slot=\"command-input\"\n      class={cn(\n        \"placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent px-2.5 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n        className\n      )}\n      {...props}\n    />\n  </div>\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-list.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"command-list\"\n  class={cn(\n    \"no-scrollbar h-[var(--command-list-height)] max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto transition-[height] duration-150 ease-out outline-none\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-empty.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, hidden = true, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"command-empty\"\n  hidden={hidden}\n  class={cn(\"py-6 text-center text-sm\", className)}\n  {...props}\n>\n  <slot>No results found.</slot>\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-group.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  heading?: string\n  value?: string\n  forceMount?: boolean\n}\n\nconst { class: className, heading, value, forceMount, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"command-group\"\n  data-value={value}\n  data-force-mount={forceMount ? \"true\" : undefined}\n  class={cn(\n    \"text-foreground [&_[data-slot=command-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[data-slot=command-group-heading]]:px-2 [&_[data-slot=command-group-heading]]:py-1.5 [&_[data-slot=command-group-heading]]:text-xs [&_[data-slot=command-group-heading]]:font-medium\",\n    className\n  )}\n  {...props}\n>\n  {heading && <div data-slot=\"command-group-heading\">{heading}</div>}\n  <slot />\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-item.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Icon } from \"@/components/ui/icon\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n  disabled?: boolean\n  href?: string\n  value?: string\n  label?: string\n  keywords?: string | string[]\n  forceMount?: boolean\n}\n\nconst {\n  class: className,\n  disabled,\n  href,\n  value,\n  label,\n  keywords,\n  forceMount,\n  ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n  data-slot=\"command-item\"\n  data-disabled={disabled ? \"true\" : undefined}\n  data-value={value}\n  data-label={label}\n  data-keywords={keywordsValue}\n  data-force-mount={forceMount ? \"true\" : undefined}\n  href={href}\n  class={cn(\n    \"group/command-item data-selected:bg-accent data-selected:text-accent-foreground data-selected:**:[svg]:text-accent-foreground href:cursor-pointer href:no-underline relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n  <Icon\n    name=\"check\"\n    class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\"\n  />\n</Tag>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-separator.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"command-separator\"\n  class={cn(\"bg-border -mx-1 h-px\", className)}\n  {...props}\n>\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/command-shortcut.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n  data-slot=\"command-shortcut\"\n  class={cn(\n    \"text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</span>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/command/index.ts",
      "content": "export { default as Command } from \"./command.astro\"\nexport { default as CommandDialog } from \"./command-dialog.astro\"\nexport { default as CommandInput } from \"./command-input.astro\"\nexport { default as CommandList } from \"./command-list.astro\"\nexport { default as CommandEmpty } from \"./command-empty.astro\"\nexport { default as CommandGroup } from \"./command-group.astro\"\nexport { default as CommandItem } from \"./command-item.astro\"\nexport { default as CommandSeparator } from \"./command-separator.astro\"\nexport { default as CommandShortcut } from \"./command-shortcut.astro\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}