{
  "name": "command-stack",
  "type": "registry:ui",
  "files": [
    {
      "path": "ui/command-stack.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { cn } from \"cn\";\nimport {\n  composeEventHandlers,\n  useComposedRefs,\n  useLayoutEffect,\n} from \"radix-ui/internal\";\nimport * as React from \"react\";\n\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandItem,\n  CommandList,\n  CommandSeparator,\n  CommandShortcut,\n} from \"@/registry/bases/radix/ui/command\";\nimport {\n  InputGroup,\n  InputGroupAddon,\n  InputGroupButton,\n} from \"@/registry/bases/radix/ui/input-group\";\nimport { IconPlaceholder } from \"@/registry/icons/icon-placeholder\";\n\nconst DEFAULT_ROOT_PAGE = \"root\";\n\ntype CommandStackValue = Record<string, string[]>;\ntype CommandStackSelectionMode = \"single\" | \"multiple\";\n\nconst EMPTY_VALUE: CommandStackValue = {};\nconst NO_SELECTION: string[] = [];\n\ninterface CommandStackPageData {\n  label?: React.ReactNode;\n  placeholder?: string;\n}\n\ninterface CommandStackStoreState {\n  pages: string[];\n  value: CommandStackValue;\n  pageData: Map<string, CommandStackPageData>;\n  loadingCount: number;\n  label: string | undefined;\n}\n\ninterface CommandStackController {\n  isPagesControlled: boolean;\n  isValueControlled: boolean;\n  onPagesChange?: (pages: string[]) => void;\n  onValueChange?: (value: CommandStackValue) => void;\n  setSearch: (search: string) => void;\n}\n\ninterface CommandStackStore {\n  controller: CommandStackController;\n  subscribe: (callback: () => void) => () => void;\n  getState: () => CommandStackStoreState;\n  notify: () => void;\n  setController: (controller: CommandStackController) => void;\n  sync: (changes: Partial<CommandStackStoreState>) => void;\n  setPages: (pages: string[]) => void;\n  pushPage: (page: string) => void;\n  popPage: () => void;\n  setSearch: (search: string) => void;\n  setValue: (value: CommandStackValue) => void;\n  setLabel: (label: string | undefined) => void;\n  selectItem: (\n    page: string,\n    itemValue: string,\n    selectionMode: CommandStackSelectionMode,\n  ) => void;\n  registerPage: (page: string, data: CommandStackPageData) => () => void;\n  registerLoading: () => () => void;\n}\n\nfunction scrollWhenFocused(node: HTMLElement | null) {\n  if (!node) return;\n  node.scrollIntoView = (options) => {\n    if (node.closest(\"[cmdk-root]\")?.contains(document.activeElement)) {\n      HTMLElement.prototype.scrollIntoView.call(node, options);\n    }\n  };\n}\n\nfunction scrollHeadingWhenFocused(node: HTMLDivElement | null) {\n  scrollWhenFocused(\n    node?.querySelector<HTMLElement>(\"[cmdk-group-heading]\") ?? null,\n  );\n}\n\nfunction getActivePage(pages: string[]) {\n  return pages[pages.length - 1] ?? DEFAULT_ROOT_PAGE;\n}\n\nfunction createCommandStackStore(\n  state: CommandStackStoreState,\n): CommandStackStore {\n  const listeners = new Set<() => void>();\n\n  const store: CommandStackStore = {\n    controller: {\n      isPagesControlled: false,\n      isValueControlled: false,\n      setSearch: () => {},\n    },\n    subscribe: (callback) => {\n      listeners.add(callback);\n      return () => listeners.delete(callback);\n    },\n    getState: () => state,\n    notify: () => {\n      for (const callback of listeners) {\n        callback();\n      }\n    },\n    setController: (controller) => {\n      store.controller = controller;\n    },\n    sync: (changes) => {\n      let hasChanged = false;\n      for (const key of Object.keys(\n        changes,\n      ) as (keyof CommandStackStoreState)[]) {\n        const nextValue = changes[key];\n        if (nextValue === undefined || Object.is(state[key], nextValue))\n          continue;\n        Object.assign(state, { [key]: nextValue });\n        hasChanged = true;\n      }\n      if (hasChanged) store.notify();\n    },\n    setPages: (pages) => {\n      if (pages.length === 0) return;\n      store.controller.onPagesChange?.(pages);\n      if (!store.controller.isPagesControlled) {\n        state.pages = pages;\n        store.notify();\n      }\n      store.setSearch(\"\");\n    },\n    pushPage: (page) => {\n      if (page === getActivePage(state.pages)) return;\n      store.setPages([...state.pages, page]);\n    },\n    popPage: () => {\n      if (state.pages.length <= 1) return;\n      store.setPages(state.pages.slice(0, -1));\n    },\n    setSearch: (search) => store.controller.setSearch(search),\n    setValue: (value) => {\n      store.controller.onValueChange?.(value);\n      if (!store.controller.isValueControlled) {\n        state.value = value;\n        store.notify();\n      }\n    },\n    setLabel: (label) => {\n      if (Object.is(state.label, label)) return;\n      state.label = label;\n      store.notify();\n    },\n    selectItem: (page, itemValue, selectionMode) => {\n      const selected = state.value[page] ?? NO_SELECTION;\n      const isSelected = selected.includes(itemValue);\n      let nextSelected: string[];\n      if (selectionMode === \"multiple\") {\n        nextSelected = isSelected\n          ? selected.filter((item) => item !== itemValue)\n          : [...selected, itemValue];\n      } else {\n        nextSelected = isSelected ? [] : [itemValue];\n      }\n      store.setValue({ ...state.value, [page]: nextSelected });\n    },\n    registerPage: (page, data) => {\n      state.pageData = new Map(state.pageData).set(page, data);\n      store.notify();\n      return () => {\n        const pageData = new Map(state.pageData);\n        pageData.delete(page);\n        state.pageData = pageData;\n        store.notify();\n      };\n    },\n    registerLoading: () => {\n      state.loadingCount += 1;\n      store.notify();\n      return () => {\n        state.loadingCount -= 1;\n        store.notify();\n      };\n    },\n  };\n\n  return store;\n}\n\nfunction useCommandStackSelector<T>(\n  store: CommandStackStore,\n  selector: (state: CommandStackStoreState) => T,\n): T {\n  const getSnapshot = () => selector(store.getState());\n  return React.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);\n}\n\nfunction selectPages(state: CommandStackStoreState) {\n  return state.pages;\n}\n\nfunction selectActivePage(state: CommandStackStoreState) {\n  return getActivePage(state.pages);\n}\n\nfunction selectValue(state: CommandStackStoreState) {\n  return state.value;\n}\n\nconst CommandStackContext = React.createContext<CommandStackStore | null>(null);\n\nfunction useCommandStackStore(consumerName: string) {\n  const store = React.useContext(CommandStackContext);\n  if (!store) {\n    throw new Error(`\\`${consumerName}\\` must be used within \\`CommandStack\\``);\n  }\n  return store;\n}\n\nconst CommandStackSearchContext = React.createContext(\"\");\n\ninterface CommandStackPageContextValue {\n  value: string;\n  selectionMode?: CommandStackSelectionMode;\n}\n\nconst CommandStackPageContext =\n  React.createContext<CommandStackPageContextValue | null>(null);\n\nfunction useCommandStack() {\n  const store = useCommandStackStore(\"useCommandStack\");\n  const pages = useCommandStackSelector(store, selectPages);\n  const value = useCommandStackSelector(store, selectValue);\n  const search = React.useContext(CommandStackSearchContext);\n\n  return {\n    pages,\n    activePage: getActivePage(pages),\n    search,\n    value,\n    pushPage: store.pushPage,\n    popPage: store.popPage,\n    setPages: store.setPages,\n    setValue: store.setValue,\n  };\n}\n\ninterface CommandStackProps extends Omit<\n  React.ComponentProps<typeof Command>,\n  \"value\" | \"defaultValue\" | \"onValueChange\"\n> {\n  value?: CommandStackValue;\n  defaultValue?: CommandStackValue;\n  onValueChange?: (value: CommandStackValue) => void;\n  pages?: string[];\n  defaultPages?: string[];\n  onPagesChange?: (pages: string[]) => void;\n  search?: string;\n  defaultSearch?: string;\n  onSearchChange?: (search: string) => void;\n}\n\nfunction CommandStack({\n  pages,\n  defaultPages,\n  onPagesChange,\n  search: searchProp,\n  defaultSearch = \"\",\n  onSearchChange,\n  value: valueProp,\n  defaultValue = EMPTY_VALUE,\n  onValueChange,\n  onKeyDown: onKeyDownProp,\n  label: labelProp,\n  className,\n  children,\n  ...props\n}: CommandStackProps) {\n  const [internalSearch, setInternalSearch] = React.useState(defaultSearch);\n  const search = searchProp ?? internalSearch;\n\n  const [store] = React.useState(() =>\n    createCommandStackStore({\n      pages: pages ?? defaultPages ?? [DEFAULT_ROOT_PAGE],\n      value: valueProp ?? defaultValue,\n      pageData: new Map(),\n      loadingCount: 0,\n      label: undefined,\n    }),\n  );\n\n  useLayoutEffect(() => {\n    store.setController({\n      isPagesControlled: pages !== undefined,\n      isValueControlled: valueProp !== undefined,\n      onPagesChange,\n      onValueChange,\n      setSearch: (nextSearch) => {\n        if (Object.is(nextSearch, search)) return;\n        onSearchChange?.(nextSearch);\n        if (searchProp === undefined) setInternalSearch(nextSearch);\n      },\n    });\n  });\n\n  useLayoutEffect(() => {\n    store.sync({ pages, value: valueProp });\n  }, [store, pages, valueProp]);\n\n  const activePage = useCommandStackSelector(store, selectActivePage);\n  const label = useCommandStackSelector(store, (state) => state.label);\n  const announcement = useCommandStackSelector(store, (state) =>\n    state.pages.length > 1\n      ? (state.pageData.get(getActivePage(state.pages))?.label ??\n        getActivePage(state.pages))\n      : null,\n  );\n\n  const [highlightedValue, setHighlightedValue] = React.useState(\"\");\n  const [prevActivePage, setPrevActivePage] = React.useState(activePage);\n\n  if (prevActivePage !== activePage) {\n    setPrevActivePage(activePage);\n    setHighlightedValue(\"\");\n  }\n\n  const onKeyDown = React.useCallback(\n    (event: React.KeyboardEvent<HTMLDivElement>) => {\n      onKeyDownProp?.(event);\n      if (event.defaultPrevented) return;\n\n      if (\n        event.key === \"Backspace\" &&\n        search.length === 0 &&\n        store.getState().pages.length > 1\n      ) {\n        event.preventDefault();\n        store.popPage();\n      }\n    },\n    [onKeyDownProp, search, store],\n  );\n\n  return (\n    <CommandStackContext.Provider value={store}>\n      <CommandStackSearchContext.Provider value={search}>\n        <Command\n          data-slot=\"command-stack\"\n          className={cn(\"h-auto rounded-md\", className)}\n          value={highlightedValue}\n          onValueChange={setHighlightedValue}\n          onKeyDown={onKeyDown}\n          label={labelProp ?? label}\n          {...props}\n        >\n          {children}\n          <span aria-live=\"polite\" className=\"sr-only\">\n            {announcement}\n          </span>\n        </Command>\n      </CommandStackSearchContext.Provider>\n    </CommandStackContext.Provider>\n  );\n}\n\nfunction CommandStackBreadcrumb({\n  className,\n  ...props\n}: React.ComponentProps<\"nav\">) {\n  const store = useCommandStackStore(\"CommandStackBreadcrumb\");\n  const pages = useCommandStackSelector(store, selectPages);\n  const pageData = useCommandStackSelector(store, (state) => state.pageData);\n\n  return (\n    <nav\n      aria-label=\"Breadcrumb\"\n      data-slot=\"command-stack-breadcrumb\"\n      className={cn(\"px-1 pt-1\", className)}\n      {...props}\n    >\n      <ol className=\"flex flex-wrap items-center gap-1\">\n        {pages.map((page, index) => {\n          const isCurrent = index === pages.length - 1;\n\n          return (\n            <li\n              key={`${page}-${index}`}\n              data-slot=\"command-stack-breadcrumb-item\"\n              aria-current={isCurrent ? \"page\" : undefined}\n              className=\"inline-flex h-5 items-center rounded-sm bg-muted px-1.5 text-xs font-medium text-muted-foreground aria-[current=page]:text-foreground\"\n            >\n              {pageData.get(page)?.label ?? page}\n            </li>\n          );\n        })}\n      </ol>\n    </nav>\n  );\n}\n\ninterface CommandStackInputProps extends Omit<\n  React.ComponentProps<typeof CommandPrimitive.Input>,\n  \"value\"\n> {\n  variant?: \"default\" | \"line\";\n}\n\nfunction CommandStackInput({\n  variant = \"default\",\n  placeholder,\n  onValueChange,\n  className,\n  ref,\n  ...props\n}: CommandStackInputProps) {\n  const store = useCommandStackStore(\"CommandStackInput\");\n  const search = React.useContext(CommandStackSearchContext);\n  const isNested = useCommandStackSelector(\n    store,\n    (state) => state.pages.length > 1,\n  );\n  const pagePlaceholder = useCommandStackSelector(\n    store,\n    (state) => state.pageData.get(getActivePage(state.pages))?.placeholder,\n  );\n  const label = props[\"aria-label\"] ?? pagePlaceholder ?? placeholder;\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const composedRef = useComposedRefs(ref, inputRef);\n\n  React.useEffect(() => {\n    const input = inputRef.current;\n    const root = input?.closest(\"[cmdk-root]\");\n    if (!input || !root) return;\n\n    // cmdk's own aria-activedescendant lags behind the highlighted item.\n    const onSync = () => {\n      const id = root.querySelector(\"[cmdk-item][aria-selected='true']\")?.id;\n      if (!id) {\n        input.removeAttribute(\"aria-activedescendant\");\n        return;\n      }\n      if (input.getAttribute(\"aria-activedescendant\") !== id) {\n        input.setAttribute(\"aria-activedescendant\", id);\n      }\n    };\n\n    onSync();\n    const observer = new MutationObserver(onSync);\n    observer.observe(root, {\n      subtree: true,\n      childList: true,\n      attributeFilter: [\"aria-selected\", \"aria-activedescendant\"],\n    });\n    return () => observer.disconnect();\n  }, []);\n\n  useLayoutEffect(() => {\n    store.setLabel(label);\n    return () => store.setLabel(undefined);\n  }, [store, label]);\n\n  const inputProps: React.ComponentProps<typeof CommandPrimitive.Input> = {\n    ref: composedRef,\n    placeholder: pagePlaceholder ?? placeholder,\n    value: search,\n    onValueChange: (nextSearch: string) => {\n      store.setSearch(nextSearch);\n      onValueChange?.(nextSearch);\n    },\n  };\n\n  if (variant === \"line\") {\n    return (\n      <div\n        data-slot=\"command-stack-input-wrapper\"\n        data-variant=\"line\"\n        className=\"-mx-1 -mt-1 mb-1 flex h-10 items-center gap-2 border-b px-4\"\n      >\n        {isNested ? (\n          <CommandStackBack className=\"-m-1\" />\n        ) : (\n          <IconPlaceholder\n            lucide=\"SearchIcon\"\n            tabler=\"IconSearch\"\n            hugeicons=\"Search01Icon\"\n            phosphor=\"MagnifyingGlassIcon\"\n            remixicon=\"RiSearchLine\"\n            className=\"size-4 shrink-0 text-muted-foreground\"\n          />\n        )}\n        <CommandPrimitive.Input\n          data-slot=\"command-stack-input\"\n          {...inputProps}\n          className={cn(\"h-full w-full bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\", className)}\n          {...props}\n        />\n      </div>\n    );\n  }\n\n  return (\n    <div\n      data-slot=\"command-stack-input-wrapper\"\n      data-variant=\"default\"\n      className=\"p-1 pb-0\"\n    >\n      <InputGroup className=\"bg-input/30 border-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:pl-2!\">\n        <CommandPrimitive.Input\n          data-slot=\"command-stack-input\"\n          {...inputProps}\n          className={cn(\n            \"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n            className,\n          )}\n          {...props}\n        />\n        <InputGroupAddon>\n          {isNested ? (\n            <InputGroupButton\n              size=\"icon-xs\"\n              aria-label=\"Back\"\n              data-slot=\"command-stack-back\"\n              className=\"-mr-1\"\n              onPointerDown={(event) => event.preventDefault()}\n              onClick={store.popPage}\n            >\n              <IconPlaceholder\n                lucide=\"ChevronLeftIcon\"\n                tabler=\"IconChevronLeft\"\n                hugeicons=\"ArrowLeft01Icon\"\n                phosphor=\"CaretLeftIcon\"\n                remixicon=\"RiArrowLeftSLine\"\n                className=\"cn-rtl-flip\"\n              />\n            </InputGroupButton>\n          ) : (\n            <IconPlaceholder\n              lucide=\"SearchIcon\"\n              tabler=\"IconSearch\"\n              hugeicons=\"Search01Icon\"\n              phosphor=\"MagnifyingGlassIcon\"\n              remixicon=\"RiSearchLine\"\n              className=\"size-4 shrink-0 opacity-50\"\n            />\n          )}\n        </InputGroupAddon>\n      </InputGroup>\n    </div>\n  );\n}\n\nfunction CommandStackBack({ className }: { className?: string }) {\n  const store = useCommandStackStore(\"CommandStackBack\");\n\n  return (\n    <button\n      type=\"button\"\n      aria-label=\"Back\"\n      data-slot=\"command-stack-back\"\n      className={cn(\"flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50\", className)}\n      onPointerDown={(event) => event.preventDefault()}\n      onClick={store.popPage}\n    >\n      <IconPlaceholder\n        lucide=\"ChevronLeftIcon\"\n        tabler=\"IconChevronLeft\"\n        hugeicons=\"ArrowLeft01Icon\"\n        phosphor=\"CaretLeftIcon\"\n        remixicon=\"RiArrowLeftSLine\"\n        className=\"size-4 cn-rtl-flip\"\n      />\n    </button>\n  );\n}\n\nfunction CommandStackList({\n  label: labelProp,\n  className,\n  ref,\n  ...props\n}: React.ComponentProps<typeof CommandList>) {\n  const store = useCommandStackStore(\"CommandStackList\");\n  const activePage = useCommandStackSelector(store, selectActivePage);\n  const label = useCommandStackSelector(store, (state) => state.label);\n  const listRef = React.useRef<HTMLDivElement>(null);\n  const composedRef = useComposedRefs(ref, listRef);\n\n  useLayoutEffect(() => {\n    if (listRef.current) listRef.current.scrollTop = 0;\n  }, [activePage]);\n\n  return (\n    <CommandList\n      ref={composedRef}\n      data-slot=\"command-stack-list\"\n      label={labelProp ?? label}\n      className={cn(\"[&_[cmdk-list-sizer]:has(>[cmdk-item])]:p-1\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction CommandStackEmpty({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandEmpty>) {\n  const store = useCommandStackStore(\"CommandStackEmpty\");\n  const isLoading = useCommandStackSelector(\n    store,\n    (state) => state.loadingCount > 0,\n  );\n\n  if (isLoading) return null;\n\n  return (\n    <CommandEmpty\n      data-slot=\"command-stack-empty\"\n      className={cn(\"[[cmdk-list]:has([cmdk-item])_&]:hidden\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction CommandStackLoading({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.Loading>) {\n  const store = useCommandStackStore(\"CommandStackLoading\");\n\n  React.useEffect(() => store.registerLoading(), [store]);\n\n  return (\n    <CommandPrimitive.Loading\n      data-slot=\"command-stack-loading\"\n      className={cn(\"py-6 text-sm text-muted-foreground *:flex *:items-center *:justify-center *:gap-2\", className)}\n      {...props}\n    />\n  );\n}\n\ninterface CommandStackPageProps {\n  value: string;\n  label?: React.ReactNode;\n  placeholder?: string;\n  selectionMode?: CommandStackSelectionMode;\n  children?: React.ReactNode;\n}\n\nfunction CommandStackPage({\n  value,\n  label,\n  placeholder,\n  selectionMode,\n  children,\n}: CommandStackPageProps) {\n  const store = useCommandStackStore(\"CommandStackPage\");\n  const isActive = useCommandStackSelector(\n    store,\n    (state) => getActivePage(state.pages) === value,\n  );\n\n  React.useEffect(() => {\n    if (label === undefined && placeholder === undefined) return;\n    return store.registerPage(value, { label, placeholder });\n  }, [store, value, label, placeholder]);\n\n  const pageContextValue = React.useMemo<CommandStackPageContextValue>(\n    () => ({ value, selectionMode }),\n    [value, selectionMode],\n  );\n\n  if (!isActive) return null;\n\n  return (\n    <CommandStackPageContext.Provider value={pageContextValue}>\n      {children}\n    </CommandStackPageContext.Provider>\n  );\n}\n\nfunction CommandStackGroup({\n  ref,\n  ...props\n}: React.ComponentProps<typeof CommandGroup>) {\n  const composedRef = useComposedRefs(ref, scrollHeadingWhenFocused);\n\n  return (\n    <CommandGroup\n      ref={composedRef}\n      data-slot=\"command-stack-group\"\n      {...props}\n    />\n  );\n}\n\ninterface CommandStackItemProps extends React.ComponentProps<\n  typeof CommandItem\n> {\n  page?: string;\n}\n\nfunction CommandStackItem({\n  page,\n  value,\n  onSelect,\n  onPointerDownCapture,\n  onMouseDown,\n  className,\n  children,\n  ref,\n  ...props\n}: CommandStackItemProps) {\n  const store = useCommandStackStore(\"CommandStackItem\");\n  const composedRef = useComposedRefs(ref, scrollWhenFocused);\n  const pageContext = React.useContext(CommandStackPageContext);\n  const selectionMode = page ? undefined : pageContext?.selectionMode;\n  const checked = useCommandStackSelector(store, (state) =>\n    selectionMode && pageContext && value !== undefined\n      ? (state.value[pageContext.value] ?? NO_SELECTION).includes(value)\n      : undefined,\n  );\n\n  return (\n    <CommandItem\n      ref={composedRef}\n      data-slot=\"command-stack-item\"\n      data-checked={checked}\n      className={cn(\n        \"rounded-sm\",\n        checked === undefined && \"[&>svg:last-child]:hidden\",\n        className,\n      )}\n      value={value}\n      onPointerDownCapture={composeEventHandlers(\n        onPointerDownCapture,\n        (event) => {\n          // A focusable item steals the input on pointerdown.\n          event.preventDefault();\n          if (event.pointerType === \"touch\") return;\n          event.currentTarget\n            .closest(\"[cmdk-root]\")\n            ?.querySelector<HTMLInputElement>(\"[cmdk-input]\")\n            ?.focus();\n        },\n      )}\n      onMouseDown={composeEventHandlers(onMouseDown, (event) => {\n        // iOS Safari can emit a synthetic mousedown without a pointerdown.\n        event.preventDefault();\n      })}\n      onSelect={(itemValue) => {\n        onSelect?.(itemValue);\n        if (page) {\n          store.pushPage(page);\n          return;\n        }\n        if (selectionMode && pageContext && value !== undefined) {\n          store.selectItem(pageContext.value, value, selectionMode);\n        }\n      }}\n      {...props}\n    >\n      {children}\n      {checked && (\n        <span role=\"img\" aria-label=\", checked\" className=\"sr-only\" />\n      )}\n      {page && (\n        <IconPlaceholder\n          lucide=\"ChevronRightIcon\"\n          tabler=\"IconChevronRight\"\n          hugeicons=\"ArrowRight01Icon\"\n          phosphor=\"CaretRightIcon\"\n          remixicon=\"RiArrowRightSLine\"\n          data-slot=\"command-stack-item-indicator\"\n          className=\"ml-auto text-muted-foreground [[data-slot$=shortcut]~&]:ml-0 cn-rtl-flip\"\n        />\n      )}\n    </CommandItem>\n  );\n}\n\nfunction CommandStackShortcut({\n  ...props\n}: React.ComponentProps<typeof CommandShortcut>) {\n  return <CommandShortcut data-slot=\"command-stack-shortcut\" {...props} />;\n}\n\nfunction CommandStackSeparator({\n  ...props\n}: React.ComponentProps<typeof CommandSeparator>) {\n  return <CommandSeparator data-slot=\"command-stack-separator\" {...props} />;\n}\n\nexport {\n  CommandStack,\n  CommandStackBreadcrumb,\n  CommandStackEmpty,\n  CommandStackGroup,\n  CommandStackInput,\n  CommandStackItem,\n  CommandStackList,\n  CommandStackLoading,\n  CommandStackPage,\n  CommandStackSeparator,\n  CommandStackShortcut,\n  useCommandStack,\n  type CommandStackSelectionMode,\n  type CommandStackValue,\n};\n",
      "target": ""
    }
  ],
  "registryDependencies": [
    "command",
    "input-group"
  ],
  "dependencies": [
    "cn",
    "cmdk",
    "radix-ui"
  ]
}