import React from 'react'
const common = require('src/helpers/common');

function DayOfWeek({ onChange, selected, disabled }) {
  return (
    <select className="textbox form-select px-4 py-2 rounded"
      id="dayofweek" name="dayofweek" onChange={onChange} value={selected} autoComplete="off" disabled={disabled}>
      {common.DaysOfWeekArray.map((day, index) => (
        <option key={day} value={day}>
          {common.dayOfWeekNames[index]}
        </option>
      ))}
    </select>
  )
}

export default DayOfWeek