import{j as e}from"./index-ukWRVZhT.js";import{E as t}from"./index-gUr5Pw56.js";import{P as a,u as l}from"./progress-bflWy5AR.js";import{E as i}from"./epic-video-B_UyM5_A.js";import{G as m}from"./error-boundary-DRADxIJy.js";import{M as n,E as c}from"./mdx-D6tq6-eo.js";import{c as d}from"./misc-Dj_mZhbv.js";import{u as p,L as x}from"./components-BgKv_YmS.js";import"./clsx-B-dksMZM.js";import"./loading-D38hMiHp.js";import"./client-hints-D8U-zfYg.js";import"./index-C7XNc9YK.js";import"./index-DDykkvu3.js";import"./tooltip-DGH2AGjl.js";import"./progress-bar-CpMgJLQi.js";function h({exercise:r}){const s=l(r.exerciseNumber);return e.jsx("li",{children:e.jsxs(x,{className:d("relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition after:absolute after:right-10 after:-translate-x-2 after:opacity-0 after:transition after:content-['→'] hover:bg-gray-50 hover:after:translate-x-0 hover:after:opacity-100 dark:hover:bg-white/5",s),to:`${r.exerciseNumber.toString().padStart(2,"0")}`,children:[e.jsx("span",{className:"text-xs font-normal tabular-nums opacity-50",children:r.exerciseNumber}),e.jsx("span",{children:r.title})]})},r.exerciseNumber)}function S(){const r=p(),s=e.jsxs("ul",{className:"flex flex-col divide-y divide-border dark:divide-border/50",children:[e.jsx("strong",{className:"px-10 pb-3 font-mono text-xs uppercase",children:"Sections"}),r.exercises.map(o=>e.jsx(h,{exercise:o},o.exerciseNumber))]});return e.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:[e.jsxs("article",{id:r.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:[e.jsx("div",{children:e.jsx("h1",{className:"px-10 text-[clamp(3rem,6vw,8.5rem)] font-extrabold leading-none",children:r.title})}),e.jsxs("div",{className:"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8",children:[e.jsx("h2",{className:"pb-5 font-mono text-xs font-semibold uppercase",children:"Intro"}),r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code?e.jsx(i,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(n,{code:r.workshopReadme.compiled.code,components:{h1:()=>null}})})}):r.workshopReadme.compiled.status==="error"?e.jsxs("div",{className:"text-red-500",children:["There was an error:",e.jsx("pre",{children:r.workshopReadme.compiled.error})]}):"No instructions yet..."]}),e.jsx("div",{className:"pb-5 pt-10",children:r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code&&r.workshopReadme.compiled.code.length>500?s:null})]}),e.jsx(t,{elementQuery:`#${r.articleId}`}),e.jsx(a,{type:"workshop-instructions",className:"h-14 border-t px-6"}),e.jsx("div",{className:"flex h-16 justify-center border-t",children:e.jsx(c,{file:r.workshopReadme.file,relativePath:r.workshopReadme.relativePath})})]})}function G(){return e.jsx(m,{})}export{G as ErrorBoundary,S as default};
//# sourceMappingURL=index-DL3be4Ze.js.map
