"use client"

import * as React from "react"
import { Combobox as BaseCombobox } from "@base-ui/react/combobox"
import { cn } from "@/lib/utils"

export type ComboboxChipProps = React.ComponentPropsWithoutRef<typeof BaseCombobox.Chip> & {
  className?: string
}

const BaseComboboxChip = BaseCombobox.Chip as React.ElementType

export const ComboboxChip = React.forwardRef<HTMLElement, ComboboxChipProps>(
  ({ className, ...props }, ref) => (
    <BaseComboboxChip
      ref={ref}
      className={cn(className)}
      {...props}
    />
  ),
)

ComboboxChip.displayName = "ComboboxChip"
