"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../../_virtual/jsx-runtime.js"),o=require("react"),l=require("../../../DatePicker/styles.js"),m=require("../../../DatePicker/components/header/index.js"),p=require("../../../DatePicker/components/calendar/index.js"),a=require("../../../DatePicker/utils.js"),C=require("../../../DatePicker/components/calendar/utils.js"),M=require("./styles.js");function q({date:s={start:new Date,end:new Date},locale:i="en_CA",startingDay:x="sunday",maxDate:c,minDate:h}){const[t,u]=o.useState(s.start.getFullYear()),[e,n]=o.useState(a.getCurrentMonth(new Date,s)),d=C.getNextMonth(e);function j(){e===a.JS_MONTHS.December?(n(0),u(t+1)):n(e+1)}function v(){e<=a.JS_MONTHS.January?(u(t-1),n(11)):n(e-1)}return r.jsxRuntimeExports.jsx(M.Wrapper,{children:r.jsxRuntimeExports.jsxs(l.Content,{children:[r.jsxRuntimeExports.jsx(m.Header,{selection:"single-date",currentMonth:e,nextMonth:d,currentYear:t,months:1,locale:i,handleNextMonth:j,handlePrevMonth:v}),r.jsxRuntimeExports.jsx(l.CalendarsWrapper,{children:r.jsxRuntimeExports.jsx(p.Calendar,{showSelectors:!1,selection:"range",selectedRange:s,month:e,year:t,startingDay:x,locale:i,handleChange:()=>{},minDate:h,maxDate:c,visible:!0})})]})})}exports.CalendarView=q;
