import{j as r,a as n,i as c}from"./index-Cdyla_OY.js";import{E as a}from"./index-mgtoNNih.js";import{E as d}from"./epic-video-CjEf3QZf.js";import{M as m,E as p}from"./mdx-DgrgY_jR.js";import{P as x}from"./progress-D9hbe2EE.js";import{g as u}from"./misc-DYOOS15_.js";import{u as f,L as h}from"./components-B-E6uop2.js";import"./loading-B4dBNbEu.js";import"./client-hints-BdCVz-7u.js";import"./index-DQyeCf3G.js";import"./index-B8k-Gd1G.js";import"./tooltip-OJ1rlWP2.js";import"./clsx-B-dksMZM.js";import"./progress-bar-SDQV9Bld.js";const C=({data:e,matches:o})=>{var i;if(!e)return[{title:"📝 | Error"}];const s=e.exercise.exerciseNumber.toString().padStart(2,"0"),t=(i=o.find(l=>l.id==="root"))==null?void 0:i.data;return[{title:`📝 | ${s}. ${e.exercise.title} | ${t==null?void 0:t.workshopTitle}`}]},b={h1:()=>null};function M(){var t;const e=f(),s=`${String(((t=e.firstStep)==null?void 0:t.stepNumber)??"01").padStart(2,"0")}/${e.firstType}`;return r.jsxs("main",{className:"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3",children:[r.jsxs("article",{id:e.articleId,className:"shadow-on-scrollbox flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 scrollbar-thin scrollbar-thumb-scrollbar md:px-10 md:py-12 md:pt-16",children:[r.jsx("div",{children:r.jsx("h1",{className:"text-[clamp(3rem,6vw,8.5rem)] font-extrabold leading-none",children:e.exercise.title})}),r.jsx("div",{children:e.exercise.instructionsCode?r.jsx(d,{epicVideoInfosPromise:e.epicVideoInfosPromise,children:r.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:r.jsx(m,{code:e.exercise.instructionsCode,components:b})})}):"No instructions yet..."})]},e.articleId),r.jsx(a,{elementQuery:`#${e.articleId}`},`scroll-${e.articleId}`),r.jsx(x,{type:"instructions",exerciseNumber:e.exerciseNumber,className:"h-14 border-t px-6"}),r.jsxs("div",{className:"flex h-16 justify-between border-b-4 border-t lg:border-b-0",children:[r.jsx("div",{}),r.jsx(p,{file:e.exerciseReadme.file,relativePath:e.exerciseReadme.relativePath}),r.jsx(h,{to:s,prefetch:"intent",className:"flex h-full items-center justify-center bg-foreground px-7 text-background",children:"Start Learning"})]})]})}function T(){const e=n();return typeof document<"u"&&console.error(e),c(e)?e.status===404?r.jsx("p",{children:"Sorry, we couldn't find that step."}):r.jsxs("p",{children:[e.status," ",e.data]}):r.jsx("p",{children:u(e)})}export{T as ErrorBoundary,M as default,C as meta};
//# sourceMappingURL=_exerciseNumber-CIlaDaon.js.map
