{"version":3,"file":"select-misc.cjs","sources":["../../../components/select/select-misc.tsx"],"sourcesContent":["'use client';\n\nimport {\n  Combobox as ComboboxPrimitive,\n  Select as SelectPrimitive\n} from '@base-ui/react';\nimport { cx } from 'class-variance-authority';\nimport { Fragment, ReactNode } from 'react';\nimport styles from './select.module.css';\nimport { useSelectContext } from './select-root';\n\nexport interface SelectGroupProps extends SelectPrimitive.Group.Props {}\n\nexport function SelectGroup({\n  className,\n  children,\n  ...props\n}: SelectGroupProps) {\n  const { shouldFilter, autocomplete } = useSelectContext();\n\n  if (shouldFilter) return <Fragment>{children}</Fragment>;\n\n  const GroupPrimitive = autocomplete\n    ? ComboboxPrimitive.Group\n    : SelectPrimitive.Group;\n\n  return (\n    <GroupPrimitive\n      className={cx(styles.menugroup, className)}\n      data-slot='select-group'\n      {...props}\n    >\n      {children}\n    </GroupPrimitive>\n  );\n}\nSelectGroup.displayName = 'Select.Group';\n\nexport interface SelectLabelProps extends SelectPrimitive.GroupLabel.Props {}\n\nexport function SelectLabel({ className, ...props }: SelectLabelProps) {\n  const { shouldFilter, autocomplete } = useSelectContext();\n\n  if (shouldFilter) return null;\n\n  const LabelPrimitive = autocomplete\n    ? ComboboxPrimitive.GroupLabel\n    : SelectPrimitive.GroupLabel;\n\n  return (\n    <LabelPrimitive\n      className={cx(styles.label, className)}\n      data-slot='select-label'\n      {...props}\n    />\n  );\n}\nSelectLabel.displayName = 'Select.Label';\n\nexport interface SelectSeparatorProps extends SelectPrimitive.Separator.Props {}\n\nexport function SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n  const { shouldFilter, autocomplete } = useSelectContext();\n\n  if (shouldFilter) return null;\n\n  const SeparatorPrimitive = autocomplete\n    ? ComboboxPrimitive.Separator\n    : SelectPrimitive.Separator;\n\n  return (\n    <SeparatorPrimitive\n      className={cx(styles.separator, className)}\n      data-slot='select-separator'\n      {...props}\n    />\n  );\n}\nSelectSeparator.displayName = 'Select.Separator';\n"],"names":[],"mappings":";;;;;;;;;;AAaM;;AAOJ;AAAkB;;;AAIhB;;AAWJ;AACA;AAIM;;AAGJ;AAAkB;;;AAIhB;;AASJ;AACA;AAIM;;AAGJ;AAAkB;;;AAIhB;;AASJ;AACA;;;;"}