import React from 'react';
import { clsx } from 'clsx';

import { forwardRef } from '../utils/react';
import { Box } from '../box';
import * as css from './select.css';

/*-- Types --*/

export interface SelectSeparatorProps {}

/*-- Main --*/

export const SelectSeparator = forwardRef<'hr', SelectSeparatorProps>(
  function SelectSeparator({ as = 'hr', className, ...rest }, ref) {
    const cn = clsx(className, css.separator);

    return <Box ref={ref} as={as} className={cn} {...rest} />;
  },
);
