(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8235,70294],{7197:(e,t,s)=>{Promise.resolve().then(s.bind(s,8235))},8235:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var a=s(95155),n=s(12115),r=s(30571),i=s(30313),d=s(75560),o=s(2581);function l(){let[e,t]=(0,n.useState)([]),[s,l]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=!1;return(0,d.BJ)().then(s=>{e||t(s)}).catch(t=>{e||(0,o.Qg)(t instanceof Error?t.message:"Failed to load holidays")}).finally(()=>{e||l(!1)}),()=>{e=!0}},[]),(0,a.jsx)(r.o,{title:"Holidays",description:"Upcoming school holidays and closed days.",children:s?(0,a.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-slate-100"}):e.length?(0,a.jsx)("ul",{className:"divide-y divide-slate-100 overflow-hidden rounded-lg border border-slate-100 bg-white shadow-sm",children:e.map(e=>(0,a.jsx)("li",{className:"px-4 py-4 sm:px-5",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-slate-900",children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-sm tabular-nums text-slate-600",children:e.startDate===e.endDate?e.startDate:`${e.startDate} → ${e.endDate}`}),e.description?(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:e.description}):null]}),(0,a.jsx)("span",{className:"rounded-md bg-slate-100 px-2 py-1 text-xs font-medium text-slate-600",children:e.holidayType})]})},e.id))}):(0,a.jsx)(i.i0,{title:"No upcoming holidays",description:"When the school adds holidays to the calendar, they will appear here."})})}},29156:(e,t,s)=>{"use strict";function a(e){if(!e)return!1;let t=e.split("?")[0]||e;return"/dashboard"===t||t.startsWith("/dashboard/")}function n(e){if(!e)return!1;let t=e.split("?")[0]||e;return"/admin"===t||t.startsWith("/admin/")}s.d(t,{M:()=>a,P:()=>n})},73321:(e,t,s)=>{"use strict";var a=s(74645);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},99462:(e,t,s)=>{"use strict";s.d(t,{Fb:()=>m,b:()=>i,sK:()=>p});var a=s(73321),n=s(12115);let r="academy-route-change";function i(){window.dispatchEvent(new Event(r))}let d=new Set,o=!1;function l(){o||(o=!0,setTimeout(()=>{o=!1,d.forEach(e=>{try{e()}catch{}})},0))}function u(e){d.add(e);let t=()=>l();return window.addEventListener("popstate",t),window.addEventListener(r,t),()=>{d.delete(e),window.removeEventListener("popstate",t),window.removeEventListener(r,t)}}function c(){return window.location.pathname||"/"}function h(){return window.location.search||""}function m(){return(0,n.useSyncExternalStore)(u,h,()=>"")}function p(){let e=(0,a.usePathname)()||"/",t=(0,n.useSyncExternalStore)(u,c,()=>e);return((0,n.useEffect)(()=>{l()},[]),t&&t!==e)?t:e}}},e=>{e.O(0,[35760,92619,59185,98500,62007,76541,30313,16645,28441,93794,77358],()=>e(e.s=7197)),_N_E=e.O()}]);