import{w as n,L as l}from"./chunk-UIGDSWPH-1hkfewjj.js";import{j as e}from"./jsx-runtime-agliiQSw.js";import{E as c}from"./index-BaIF645K.js";import{r as m}from"./index-BtyHvDgk.js";import{E as a}from"./epic-video-DTKLtvzE.js";import{I as d,c as f}from"./misc-CJRwnByf.js";import{L as x}from"./loading-DiAugSWv.js";import{N as p}from"./nav-chevrons-CQean-Ez.js";import{u as h}from"./revalidation-ws-367FRWA_.js";import{E as u}from"./launch-editor-CXRQAcoM.js";import{P as b}from"./progress-DAUJ_Zz6.js";import{u as j}from"./index-sWE7Vh13.js";import{M as g}from"./mdx-BbPgj1nD.js";import{u as N}from"./online-BJUQDd5b.js";import{g as v}from"./root-loader-CIAkTEfn.js";import{g as w}from"./seo-DgDw-ivC.js";import"./types-BzMnrBW1.js";import"./user-DPQPC1Ql.js";import"./workshop-config-BKSyfc8n.js";import"./progress-bar-CF3aJM3k.js";import"./pe-jEPZ3eFB.js";import"./tooltip-Dei6jwuV.js";import"./index-D93mqesT.js";import"./index-Cdv7JOPa.js";import"./preload-helper-xT6v_9JT.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"8bd8bc3153d70a1c10ccde8d38796bd67282553d"}}catch{}})();const K=({loaderData:r,matches:s})=>{const i=r?.exercise.exerciseNumber.toString().padStart(2,"0"),o=v(s);return!r||!o?[{title:"🦉 | Error"}]:w({title:`🦉 | ${i}. ${r.exercise.title} | ${o?.workshopTitle}`,description:`Elaboration for ${i}. ${r.exercise.title}`,ogTitle:`Finished: ${r.exercise.title}`,ogDescription:`Elaboration for exercise ${Number(i)}`,instructor:o.instructor,requestInfo:o.requestInfo})},y={h1:()=>null},X=n(function({loaderData:s}){const i=s.exercise.exerciseNumber.toString().padStart(2,"0");return h({watchPaths:[`./exercises/${i}/FINISHED.mdx`]}),e.jsx("div",{className:"flex max-w-full grow flex-col",children:e.jsxs("main",{className:"flex grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1",children:[e.jsxs("div",{className:"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r",children:[e.jsx("h1",{className:"h-14 border-b pr-5 pl-10 text-sm leading-tight font-medium",children:e.jsx("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:e.jsxs("div",{className:"flex items-center justify-start gap-x-2",children:[e.jsx(l,{to:`/${i}`,className:"hover:underline",children:`${i}. ${s.exercise.title}`}),e.jsx("span",{children:"/"}),e.jsx("span",{children:"Elaboration"})]})})}),e.jsx("article",{className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 sm:p-10 sm:pt-8",id:s.articleId,children:s.exercise.finishedCode?e.jsx(a,{epicVideoInfosPromise:s.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(g,{code:s.exercise.finishedCode,components:y})})}):"No finished instructions yet..."}),e.jsx(c,{elementQuery:`#${s.articleId}`}),e.jsx(b,{type:"finished",exerciseNumber:s.exercise.exerciseNumber,className:"h-14 border-t px-6"}),e.jsxs("div",{className:"@container flex h-16 justify-between border-t border-b-4 lg:border-b-0",children:[e.jsx("div",{}),e.jsx(u,{file:s.exerciseFinished.file,relativePath:s.exerciseFinished.relativePath}),e.jsx(p,{prev:s.prevStepLink,next:s.nextStepLink})]})]}),e.jsx(E,{exerciseFormEmbedUrl:s.exerciseFormEmbedUrl,exerciseTitle:s.exercise.title})]})})});function E({exerciseFormEmbedUrl:r,exerciseTitle:s}){const i=j(),[o,t]=m.useState(!1);return N()?e.jsxs("div",{className:"relative min-h-full sm:min-h-[unset] sm:shrink-0",children:[o?null:e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(x,{children:e.jsxs("span",{children:["Loading ",s," Elaboration form"]})})}),e.jsx("iframe",{onLoad:()=>t(!0),onError:()=>t(!0),title:"Elaboration",src:r,className:f("absolute inset-0 flex h-full w-full transition-opacity duration-300",o?"opacity-100":"opacity-0"),style:{colorScheme:i}})]}):e.jsx("div",{className:"relative shrink-0",children:e.jsx("div",{className:"text-body-md text-foreground-destructive absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(d,{name:"WifiNoConnection",size:"xl",children:e.jsxs("span",{children:["Unable to load the ",e.jsx("a",{href:r,className:"underline",children:`${s} feedback form`})," when offline"]})})})})}export{X as default,K as meta};
//# sourceMappingURL=_exerciseNumber_.finished-r3EL31s1.js.map
