(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7506],{1511:(e,s,a)=>{Promise.resolve().then(a.bind(a,6572))},5695:(e,s,a)=>{"use strict";var n=a(8999);a.o(n,"useParams")&&a.d(s,{useParams:function(){return n.useParams}}),a.o(n,"usePathname")&&a.d(s,{usePathname:function(){return n.usePathname}}),a.o(n,"useRouter")&&a.d(s,{useRouter:function(){return n.useRouter}}),a.o(n,"useSearchParams")&&a.d(s,{useSearchParams:function(){return n.useSearchParams}})},6572:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>i});var n=a(5155),r=a(2108),u=a(5695),t=a(2115);function i(e){let{children:s,params:a}=e,{data:i,status:o}=(0,r.useSession)(),c=(0,u.useRouter)(),[l,d]=(0,t.useState)(""),[f,h]=(0,t.useState)(!0);return((0,t.useEffect)(()=>{(async()=>{d((await a).locale)})()},[a]),(0,t.useEffect)(()=>{if("loading"!==o){if(!(null==i?void 0:i.user))return void c.push("/".concat(l,"/login"));h(!1)}},[i,o,c,l]),"loading"===o||f)?(0,n.jsx)("div",{className:"d-flex align-items-center justify-content-center loading-container",children:(0,n.jsx)("div",{className:"spinner-border text-primary",role:"status",children:(0,n.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}):(null==i?void 0:i.user)?(0,n.jsx)(n.Fragment,{children:s}):null}}},e=>{e.O(0,[2108,8441,5964,7358],()=>e(e.s=1511)),_N_E=e.O()}]);