"use strict";exports.__esModule = true;exports.InternalDateSetter = void 0;

var _types = require("./types");var

InternalDateSetter = exports.InternalDateSetter = /*#__PURE__*/function () {function InternalDateSetter() {}InternalDateSetter.
  setValueDateComponent = function setValueDateComponent(
  internalDate,
  type,
  nextValue)
  {
    if (type === _types.InternalDateComponentType.All) {
      internalDate.setComponents(nextValue);
      return internalDate;
    }
    if (type === _types.InternalDateComponentType.Year) {
      internalDate.setYear(nextValue);
    } else if (type === _types.InternalDateComponentType.Month) {
      internalDate.setMonth(nextValue);
    } else if (type === _types.InternalDateComponentType.Date) {
      internalDate.setDate(nextValue);
    }
    return internalDate;
  };InternalDateSetter.

  shiftValueDateComponent = function shiftValueDateComponent(
  internalDate,
  type,
  step,
  settings)
  {
    if (type === _types.InternalDateComponentType.Year) {
      internalDate.shiftYear(step, settings);
    } else if (type === _types.InternalDateComponentType.Month) {
      internalDate.shiftMonth(step, settings);
    } else if (type === _types.InternalDateComponentType.Date) {
      internalDate.shiftDate(step, settings);
    } else if (type === _types.InternalDateComponentType.All) {
      internalDate.shiftDate(step, settings);
    }
    return internalDate;
  };return InternalDateSetter;}();