"use strict";

exports.__esModule = true;
exports.getClosesAt = void 0;

var getClosesAt = function getClosesAt(workHours) {
  var d = new Date();
  var weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  var todaysWorkHours = workHours[weekDays[d.getDay()].toLowerCase()];
  var time = new Date(todaysWorkHours.end);
  var closesAt = ('0' + time.getHours()).slice(-2) + ':' + ('0' + time.getMinutes()).slice(-2);
  return closesAt;
};

exports.getClosesAt = getClosesAt;
//# sourceMappingURL=index.js.map