'use client';

import CustomDropdown from './CustomDropdown';

interface Props {
  options: string[];
  value: string;
  onChange: (val: string) => void;
  placeholder: string;
  hasError?: boolean;
}

export default function StringDropdown({ options, value, onChange, placeholder, hasError }: Props) {
  return (
    <CustomDropdown
      options={options.map((o) => ({ value: o, label: o }))}
      value={value}
      onChange={onChange}
      placeholder={placeholder}
      hasError={hasError}
    />
  );
}