import{w as n,L as l}from"./chunk-UIGDSWPH-BWkP6tD5.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as a}from"./index-BwZqB-mh.js";import{r as c}from"./index-Az39ZADK.js";import{E as m}from"./epic-video-Rho2ab6H.js";import{I as d,c as p}from"./misc-BapXpylh.js";import{L as f}from"./loading-DyvhEH4Q.js";import{N as h}from"./nav-chevrons-Q_xwzgQq.js";import{u as x}from"./revalidation-ws-BahUMYqf.js";import{M as u}from"./mdx-5oKUb-AI.js";import{u as j}from"./online-Dw7HU4wM.js";import{g as b}from"./root-loader-C5P2c7MU.js";import{g}from"./seo-t5J-DRxw.js";import{E as v}from"./launch-editor-dGpSXAZC.js";import{P as w}from"./progress-DJ4oeyzx.js";import{u as N}from"./index-_LzGTKVC.js";import"./types-Cl2NuNg4.js";import"./user-DtZkTMil.js";import"./workshop-config-DCYN9tG7.js";import"./index-CjiomtK6.js";import"./index-Dd9cSrtE.js";import"./preload-helper-BXl3LOEh.js";import"./progress-bar-D66irkpP.js";import"./pe-Bs-DFNma.js";import"./tooltip-C2AQeNhD.js";const X={getSitemapEntries:()=>[{route:"/finished"}]},Z=({matches:r})=>{const s=b(r);return s?g({title:`🎉 ${s?.workshopTitle}`,description:`Elaboration for ${s?.workshopTitle}`,ogTitle:`Finished ${s?.workshopTitle}`,ogDescription:"You finished! Time to submit feedback.",instructor:s.instructor,requestInfo:s.requestInfo}):[]},k={h1:()=>null},_=n(function({loaderData:s}){return x({watchPaths:["./exercises/FINISHED.mdx"]}),e.jsx("div",{className:"flex h-full grow flex-col",children:e.jsxs("main",{className:"grid h-full grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1",children:[e.jsxs("div",{className:"relative col-span-1 row-span-1 flex h-full flex-col lg:border-r",children:[e.jsx("h1",{className:"h-14 border-b pr-5 pl-10 text-sm leading-none font-medium uppercase",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:"/",className:"hover:underline",children:s.workshopTitle}),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.finishedCode?e.jsx(m,{epicVideoInfosPromise:s.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(u,{code:s.finishedCode,components:k})})}):"No finished instructions yet..."}),e.jsx(a,{elementQuery:`#${s.articleId}`}),e.jsx(w,{type:"workshop-finished",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",{}),s.workshopFinished.status==="success"?e.jsx(v,{file:s.workshopFinished.file,relativePath:s.workshopFinished.relativePath}):null,e.jsx(h,{prev:s.prevStepLink,next:{to:"/"}})]})]}),e.jsx(E,{workshopTitle:s.workshopTitle,workshopFormEmbedUrl:s.workshopFormEmbedUrl})]})})});function E({workshopTitle:r,workshopFormEmbedUrl:s}){const t=N(),[o,i]=c.useState(!1);return j()?e.jsxs("div",{className:"relative shrink-0",children:[o?null:e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(f,{children:e.jsxs("span",{children:["Loading ",r," Elaboration form"]})})}),e.jsx("iframe",{onLoad:()=>i(!0),onError:()=>i(!0),title:"Elaboration",src:s,className:p("absolute inset-0 flex h-full w-full transition-opacity duration-300",o?"opacity-100":"opacity-0"),style:{colorScheme:t}})]}):e.jsx("div",{className:"relative shrink-0",children:e.jsx("div",{className:"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:s,className:"underline",children:`${r} feedback form`})," when offline"]})})})})}export{_ as default,X as handle,Z as meta};
//# sourceMappingURL=finished-CXP6J1ey.js.map
