import{a as g}from"/build/_shared/chunk-QYDFB2PH.js";import{a as h,c as b}from"/build/_shared/chunk-TVJAN66A.js";import{a as u}from"/build/_shared/chunk-CG7OF7U6.js";import{a as x}from"/build/_shared/chunk-JWVFBRIV.js";import"/build/_shared/chunk-LIQTNBUG.js";import{g as f}from"/build/_shared/chunk-WZFE4PGD.js";import"/build/_shared/chunk-SLNM5P2A.js";import"/build/_shared/chunk-32YOKIWQ.js";import"/build/_shared/chunk-IHR7WGUA.js";import"/build/_shared/chunk-HTTIUZX4.js";import"/build/_shared/chunk-BH32IDM5.js";import"/build/_shared/chunk-J57633IL.js";import"/build/_shared/chunk-ZMXU4C7Z.js";import{a as S,b as F}from"/build/_shared/chunk-LRTFSTL7.js";import{a as y}from"/build/_shared/chunk-YCZ72ESF.js";import{h as m}from"/build/_shared/chunk-FCFTNN44.js";import"/build/_shared/chunk-N2QZPEPI.js";import{A as p,a as w,p as c,u as d}from"/build/_shared/chunk-IYEHZB2Y.js";import{d as t}from"/build/_shared/chunk-4AMCPB2Y.js";var L=t(y(),1);var v=t(w(),1);var s=t(S(),1);var l=t(F(),1),e=t(p(),1),k=({data:r,matches:i})=>{if(!r)return[{title:"\u{1F989} | Error"}];let o=r.exercise.exerciseNumber.toString().padStart(2,"0"),a=i.find(n=>n.id==="root")?.data;return[{title:`\u{1F989} | ${o}. ${r.exercise.title} | ${a?.workshopTitle}`}]};function N(){let r=d(),i=r.exercise.exerciseNumber.toString().padStart(2,"0"),{workshopTitle:o,exercise:{title:a}}=r;return(0,e.jsx)("div",{className:"flex flex-grow flex-col",children:(0,e.jsxs)("main",{className:"grid h-full flex-grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1",children:[(0,e.jsxs)("div",{className:"relative col-span-1 row-span-1 flex h-full flex-col border-r border-border",children:[(0,e.jsx)("h1",{className:"h-14 border-b border-border pl-10 pr-5 text-sm font-medium uppercase leading-none",children:(0,e.jsx)("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:(0,e.jsxs)("div",{className:"flex items-center justify-start gap-x-2",children:[(0,e.jsx)(c,{to:`/${i}`,className:"hover:underline",children:`${i}. ${r.exercise.title}`}),(0,e.jsx)("span",{children:"/"}),(0,e.jsx)("span",{children:"Elaboration"})]})})}),(0,e.jsx)("article",{className:"shadow-on-scrollbox h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-10 pt-8 scrollbar-thin scrollbar-thumb-scrollbar","data-restore-scroll":"true",children:r.exercise.finishedCode?(0,e.jsx)(u,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:(0,e.jsx)("div",{className:"prose dark:prose-invert sm:prose-lg",children:(0,e.jsx)(b,{code:r.exercise.finishedCode,components:{h1:()=>null}})})}):"No finished instructions yet..."}),(0,e.jsx)(f,{type:"finished",exerciseNumber:r.exercise.exerciseNumber,className:"h-14 border-t px-6"}),(0,e.jsxs)("div",{className:"flex h-16 justify-between border-b-4 border-t border-border lg:border-b-0",children:[(0,e.jsx)("div",{}),r.exerciseFinished?(0,e.jsx)(h,{file:r.exerciseFinished.file,relativePath:r.exerciseFinished.relativePath}):null,(0,e.jsx)(g,{prev:r.prevStepLink,next:r.nextStepLink})]})]}),(0,e.jsx)(T,{workshopTitle:o,exerciseTitle:a})]})})}function T({workshopTitle:r,exerciseTitle:i}){let[o,a]=v.useState(!1),n=new URLSearchParams([["embedded","true"],["entry.1836176234",r],["entry.428900931",i]]);return(0,e.jsxs)("div",{className:"relative flex-shrink-0",children:[o?null:(0,e.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,e.jsx)(x,{children:(0,e.jsxs)("span",{children:["Loading ",i," Elaboration form"]})})}),(0,e.jsx)("iframe",{onLoad:()=>a(!0),title:"Elaboration",src:`https://docs.google.com/forms/d/e/1FAIpQLSf3o9xyjQepTlOTH5Z7ZwkeSTdXh6YWI_RGc9KiyD3oUN0p6w/viewform?${n.toString()}&hl=en`,className:m("absolute inset-0 flex h-full w-full transition-opacity duration-300",o?"opacity-100":"opacity-0")})]})}export{N as default,k as meta};
//# sourceMappingURL=/build/routes/_app+/_exercises+/$exerciseNumber_.finished-Z3KMH7YC.js.map
