{"version":3,"sources":["../../../../src/components/Calendar/CalendarMonth/renderCalendarMonth.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { CalendarMonthState, CalendarMonthSlots } from './CalendarMonth.types';\n\n/**\n * Render the final JSX of CalendarMonth.\n */\nexport const renderCalendarMonth = (state: CalendarMonthState): JSXElement => {\n  assertSlots<CalendarMonthSlots>(state);\n\n  return (\n    <state.root>\n      {state.isYearPickerVisible ? (\n        <state.yearPicker />\n      ) : (\n        <>\n          <state.header>\n            <state.heading />\n            <state.navigation>\n              <state.previousYearButton />\n              <state.nextYearButton />\n            </state.navigation>\n          </state.header>\n          <state.grid>\n            {/* Consumer children replace the default rows. */}\n            {state.grid.children !== undefined\n              ? state.grid.children\n              : state.monthRows.map(row => (\n                  <div key={row.key} {...state.getMonthRowProps(row).root}>\n                    {row.cells.map(cell => {\n                      const cellProps = state.getMonthCellProps(cell);\n                      return (\n                        <div key={cell.index} {...cellProps.root}>\n                          <button {...cellProps.button} />\n                        </div>\n                      );\n                    })}\n                  </div>\n                ))}\n          </state.grid>\n        </>\n      )}\n    </state.root>\n  );\n};\n"],"names":["renderCalendarMonth","state","assertSlots","root","isYearPickerVisible","yearPicker","header","heading","navigation","previousYearButton","nextYearButton","grid","children","undefined","monthRows","map","row","div","getMonthRowProps","cells","cell","cellProps","getMonthCellProps","button","index","key"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;;;;+BAQpCA;;;eAAAA;;;;gCAPe;AAOrB,MAAMA,sBAAsB,CAACC;IAClCC,IAAAA,2BAAW,EAAqBD;IAEhC,qBACE,qBAACA,MAAME,IAAI;kBACRF,MAAMG,mBAAmB,iBACxB,qBAACH,MAAMI,UAAU,sBAEjB;;8BACE,sBAACJ,MAAMK,MAAM;;sCACX,qBAACL,MAAMM,OAAO;sCACd,sBAACN,MAAMO,UAAU;;8CACf,qBAACP,MAAMQ,kBAAkB;8CACzB,qBAACR,MAAMS,cAAc;;;;;8BAGzB,qBAACT,MAAMU,IAAI;8BAERV,MAAMU,IAAI,CAACC,QAAQ,KAAKC,YACrBZ,MAAMU,IAAI,CAACC,QAAQ,GACnBX,MAAMa,SAAS,CAACC,GAAG,CAACC,CAAAA,oBAClB,qBAACC;4BAAmB,GAAGhB,MAAMiB,gBAAgB,CAACF,KAAKb,IAAI;sCACpDa,IAAIG,KAAK,CAACJ,GAAG,CAACK,CAAAA;gCACb,MAAMC,YAAYpB,MAAMqB,iBAAiB,CAACF;gCAC1C,qBACE,qBAACH;oCAAsB,GAAGI,UAAUlB,IAAI;8CACtC,cAAA,qBAACoB;wCAAQ,GAAGF,UAAUE,MAAM;;mCADpBH,KAAKI,KAAK;4BAIxB;2BARQR,IAAIS,GAAG;;;;;AAgBnC"}