import type {
  DetailedHTMLProps,
  FC,
  ReactNode,
  SelectHTMLAttributes
} from 'react'
import type { MergeOmitting } from '@/types/helpers'
import '@/components/ui/select.css'

type SelectProps = MergeOmitting<
  DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>,
  {
    children: ReactNode
  }
>

const Select: FC<SelectProps> = ({ children, className, ...selectProps }) => {
  return (
    <select
      className={`st-rnd-select${className ? ` ${className}` : ''}`}
      {...selectProps}
    >
      {children}
    </select>
  )
}

export default Select
