import styles from './NetworkSelect.module.css'

const NETWORKS = ['ETH', 'BSC', 'TRX', 'SOL']

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

export function NetworkSelect({ label, value, onChange }: Props) {
  return (
    <div className={styles.wrap}>
      <span className={styles.label}>{label}</span>
      <select
        className={styles.select}
        value={value}
        onChange={e => onChange(e.target.value)}
      >
        {NETWORKS.map(n => (
          <option key={n} value={n}>{n}</option>
        ))}
      </select>
    </div>
  )
}
