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

const splitProps = createSplitProps<UseDrawerProps>();

export function splitDrawerProps<T extends UseDrawerProps & Record<string, any>>(props: T) {
  return splitProps(props, [
    'aria-label',
    'closeOnEscape',
    'closeOnInteractOutside',
    'defaultOpen',
    'defaultSnapPoint',
    'finalFocusEl',
    'id',
    'ids',
    'initialFocusEl',
    'modal',
    'onEscapeKeyDown',
    'onFocusOutside',
    'onInteractOutside',
    'onOpenChange',
    'onPointerDownOutside',
    'onSnapPointChange',
    'open',
    'preventScroll',
    'restoreFocus',
    'snapPoint',
    'snapPoints',
    'swipeDirection',
    'trapFocus',
  ]);
}
