"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.WithButtonSwitcherSchedulerContainer = WithButtonSwitcherSchedulerContainer;
var _react = _interopRequireDefault(require("react"));
var _advancedScheduler = require("./advanced-scheduler");
var _simpleScheduler = require("./simple-scheduler");
var _buttonSwitcher = require("./button-switcher");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function WithButtonSwitcherSchedulerContainer({
  showAdvancedScheduler,
  onUpdateSchedule,
  isDisabled,
  validationTexts,
  initialSchedule,
  schedulerKey,
  validateArrayOfRangedNumbersOrAll,
  simpleSchedulerToggleButtonText,
  advancedSchedulerToggleButtonText,
  simpleSchedulerModalTexts,
  advancedSchedulerInfoTexts,
  labelTexts,
  frequencyOptions,
  daysOfWeek,
  months,
  onUseSimpleScheduler,
  onUseAdvancedScheduler,
  advancedSchedulerSwitcherIcon,
  simpleSchedulerSwitcherIcon
}) {
  const switcherIcon = showAdvancedScheduler ? simpleSchedulerSwitcherIcon : advancedSchedulerSwitcherIcon;
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
    children: [showAdvancedScheduler ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_advancedScheduler.AdvancedScheduler, {
      onUpdateSchedule: onUpdateSchedule,
      initialSchedule: initialSchedule,
      validateArrayOfRangedNumbersOrAll: validateArrayOfRangedNumbersOrAll,
      labelTexts: labelTexts,
      infoTexts: advancedSchedulerInfoTexts,
      isDisabled: isDisabled
    }, schedulerKey) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_simpleScheduler.SimpleScheduler, {
      onUpdateSchedule: onUpdateSchedule,
      initialSchedule: initialSchedule,
      frequencyOptions: frequencyOptions,
      validateArrayOfRangedNumbersOrAll: validateArrayOfRangedNumbersOrAll,
      daysOfWeek: daysOfWeek,
      months: months,
      labelTexts: labelTexts,
      validationTexts: validationTexts,
      isDisabled: isDisabled
    }, schedulerKey), /*#__PURE__*/(0, _jsxRuntime.jsx)(_buttonSwitcher.ButtonSwitcher, {
      showAdvancedScheduler: showAdvancedScheduler,
      advancedSchedulerToggleButtonText: advancedSchedulerToggleButtonText,
      onUseAdvancedScheduler: onUseAdvancedScheduler,
      simpleSchedulerModalTexts: simpleSchedulerModalTexts,
      simpleSchedulerToggleButtonText: simpleSchedulerToggleButtonText,
      onUseSimpleScheduler: onUseSimpleScheduler,
      isDisabled: isDisabled,
      icon: switcherIcon
    })]
  });
}