import type { RefAttributes } from "react";

export interface OptionProps extends RefAttributes<HTMLOptionElement> {
  value?: string;
  children?: string;
  isDisabled?: boolean;
}

const Option = ({ ref, ...props }: OptionProps) => {
  const { isDisabled, ...rest } = props;
  const mappedProps = {
    ...rest,
    disabled: isDisabled,
  };
  return <option {...mappedProps} ref={ref} />;
};

Option.displayName = "Option";
export { Option };
