import {Saturday, Sunday}from '../constants/days'
import {WorkingDayType, SaturdayType,SundayType }from '../constants/workingHours'

export default function getHours(officeHours) {
    var day = new Date().getDay();
    if(officeHours === undefined && officeHours.length < 3 ){
        return null;
    }
    else if(day === Saturday){
        return officeHours[SaturdayType].hours;
    }
    else if(day === Sunday){
        return officeHours[SundayType].hours;
    }
    else {
        return officeHours[WorkingDayType].hours;
    }
    
}