{"version":3,"file":"command-misc.cjs","sources":["../../../components/command/command-misc.tsx"],"sourcesContent":["'use client';\n\nimport { Autocomplete as AutocompletePrimitive } from '@base-ui/react/autocomplete';\nimport { cx } from 'class-variance-authority';\nimport styles from './command.module.css';\nimport { useCommandContext } from './command-root';\n\nexport type CommandGroupProps = AutocompletePrimitive.Group.Props;\n\nexport const CommandGroup = ({\n  className,\n  children,\n  ...props\n}: CommandGroupProps) => {\n  const { inputValue, hasItems } = useCommandContext();\n  if (!hasItems && inputValue?.length) return <>{children}</>;\n\n  return (\n    <AutocompletePrimitive.Group\n      data-slot='command-group'\n      className={cx(styles.group, className)}\n      {...props}\n    >\n      {children}\n    </AutocompletePrimitive.Group>\n  );\n};\nCommandGroup.displayName = 'Command.Group';\n\nexport type CommandLabelProps = AutocompletePrimitive.GroupLabel.Props;\n\nexport const CommandLabel = ({ className, ...props }: CommandLabelProps) => {\n  const { inputValue, hasItems } = useCommandContext();\n  if (!hasItems && inputValue?.length) return null;\n\n  return (\n    <AutocompletePrimitive.GroupLabel\n      data-slot='command-label'\n      className={cx(styles.label, className)}\n      {...props}\n    />\n  );\n};\nCommandLabel.displayName = 'Command.Label';\n\nexport type CommandSeparatorProps = AutocompletePrimitive.Separator.Props;\n\nexport const CommandSeparator = ({\n  className,\n  ...props\n}: CommandSeparatorProps) => {\n  const { inputValue, hasItems } = useCommandContext();\n  if (!hasItems && inputValue?.length) return null;\n\n  return (\n    <AutocompletePrimitive.Separator\n      data-slot='command-separator'\n      className={cx(styles.separator, className)}\n      {...props}\n    />\n  );\n};\nCommandSeparator.displayName = 'Command.Separator';\n"],"names":[],"mappings":";;;;;;;;;AASO;;AAML;;;AAWF;AACA;AAIO;;AAEL;AAAqC;;AASvC;AACA;AAIO;;AAKL;AAAqC;;AASvC;AACA;;;;"}