import { InternalDateComponentType } from "../types";
export var InternalDateSetter = /*#__PURE__*/function () {
  function InternalDateSetter() {}
  InternalDateSetter.setValueDateComponent = function setValueDateComponent(internalDate, type, nextValue) {
    if (type === InternalDateComponentType.All) {
      internalDate.setComponents(nextValue);
      return internalDate;
    }
    if (type === InternalDateComponentType.Year) {
      internalDate.setYear(nextValue);
    } else if (type === InternalDateComponentType.Month) {
      internalDate.setMonth(nextValue);
    } else if (type === InternalDateComponentType.Date) {
      internalDate.setDate(nextValue);
    }
    return internalDate;
  };
  InternalDateSetter.shiftValueDateComponent = function shiftValueDateComponent(internalDate, type, step, settings) {
    if (type === InternalDateComponentType.Year) {
      internalDate.shiftYear(step, settings);
    } else if (type === InternalDateComponentType.Month) {
      internalDate.shiftMonth(step, settings);
    } else if (type === InternalDateComponentType.Date) {
      internalDate.shiftDate(step, settings);
    } else if (type === InternalDateComponentType.All) {
      internalDate.shiftDate(step, settings);
    }
    return internalDate;
  };
  return InternalDateSetter;
}();