import { Select } from '@shared/ui'
import styles from './NetworkSelect.module.css'

interface Props {
  label: string
  value: string
  onChange: (v: string) => void
  options: string[]
}

export function NetworkSelect({ label, value, onChange, options }: Props) {
  return (
    <div className={styles.wrap}>
      <span className={styles.label}>{label}</span>
      <div className={styles.select}>
        <Select
          value={value}
          onChange={onChange}
          options={options.map(o => ({ value: o, label: o }))}
        />
      </div>
    </div>
  )
}
