"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/jsx-runtime.js"),n=require("./styles.js"),s=require("../../../../icons/ChevronLeft.js"),o=require("../../../../icons/ChevronRight.js"),r=require("../../../IconButton/index.js"),a=require("../../dateUtils.js"),x=require("../calendar/utils.js");const i="previousMonthIconButton";function u(t){return t.selection==="range"&&t.months===2?e.jsxRuntimeExports.jsxs(n.Wrapper,{children:[e.jsxRuntimeExports.jsxs(n.RangeButtonsWrapper,{children:[e.jsxRuntimeExports.jsx(r.IconButton,{className:i,icon:e.jsxRuntimeExports.jsx(s.default,{}),variant:"ghost-tertiary",size:"x-small",onClick:t.handlePrevMonth,"aria-label":"previous month","data-testid":`${t["data-testid"]}-previousMonth`}),e.jsxRuntimeExports.jsx(n.MonthYear,{isLeft:!0,"aria-live":"polite",children:`${a.getMonthName(t.currentMonth,t.locale)} ${t.currentYear}`})]}),e.jsxRuntimeExports.jsxs(n.RangeButtonsWrapper,{children:[e.jsxRuntimeExports.jsx(n.MonthYear,{children:`${a.getMonthName(t.nextMonth,t.locale)} ${x.getNextYear(t.currentMonth,t.currentYear)}`}),e.jsxRuntimeExports.jsx(r.IconButton,{icon:e.jsxRuntimeExports.jsx(o.default,{}),variant:"ghost-tertiary",size:"x-small",onClick:t.handleNextMonth,"aria-label":"next month","data-testid":`${t["data-testid"]}-nextMonth`})]})]}):e.jsxRuntimeExports.jsxs(n.Wrapper,{children:[e.jsxRuntimeExports.jsx(n.MonthYear,{"aria-live":"polite",children:`${a.getMonthName(t.currentMonth,t.locale)} ${t.currentYear}`}),e.jsxRuntimeExports.jsxs(n.ButtonsWrapper,{children:[e.jsxRuntimeExports.jsx(r.IconButton,{className:i,icon:e.jsxRuntimeExports.jsx(s.default,{}),variant:"ghost-tertiary",size:"x-small",onClick:t.handlePrevMonth,"aria-label":"previous month","data-testid":`${t["data-testid"]}-previousMonth`}),e.jsxRuntimeExports.jsx(r.IconButton,{icon:e.jsxRuntimeExports.jsx(o.default,{}),variant:"ghost-tertiary",size:"x-small",onClick:t.handleNextMonth,"aria-label":"next month","data-testid":`${t["data-testid"]}-nextMonth`})]})]})}exports.Header=u;exports.previousMonthButton=i;
