import { createSplitProps } from '../../utils/create-split-props.ripple';
import type { UseComboboxProps } from './use-combobox.ripple';

const splitProps = createSplitProps<UseComboboxProps<any>>();

export function splitComboboxProps<T extends UseComboboxProps<any> & Record<string, any>>(props: T) {
  return splitProps(props, [
    'allowCustomValue',
    'alwaysSubmitOnEnter',
    'autoFocus',
    'closeOnSelect',
    'collection',
    'composite',
    'defaultHighlightedValue',
    'defaultInputValue',
    'defaultOpen',
    'defaultValue',
    'disabled',
    'disableLayer',
    'form',
    'highlightedValue',
    'id',
    'ids',
    'inputBehavior',
    'inputValue',
    'invalid',
    'loopFocus',
    'multiple',
    'name',
    'navigate',
    'onFocusOutside',
    'onHighlightChange',
    'onInputValueChange',
    'onInteractOutside',
    'onOpenChange',
    'onPointerDownOutside',
    'onSelect',
    'onValueChange',
    'open',
    'openOnChange',
    'openOnClick',
    'openOnKeyPress',
    'placeholder',
    'positioning',
    'readOnly',
    'required',
    'scrollToIndexFn',
    'selectionBehavior',
    'translations',
    'value',
  ]);
}
