import{u as o,j as e}from"./vendor-BKmmeuxg.js";import{A as m,a as x,b as p,c as h}from"./accordion-CNBvFN43.js";import"./utils-DxSsnXxD.js";const g=()=>{var r,i;const{props:l}=o(),{modules:t}=l;return e.jsx(e.Fragment,{children:t&&t.length>0?e.jsx(m,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:(i=(r=t[0])==null?void 0:r.id)==null?void 0:i.toString(),children:t.map((s,n)=>{var c;return e.jsxs(x,{value:((c=s.id)==null?void 0:c.toString())||n.toString(),className:"overflow-hidden rounded-lg border",children:[e.jsxs(p,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[n+1,". ",s.title]}),e.jsx(h,{className:"space-y-2 p-2",children:s.questions&&s.questions.length>0?e.jsx("div",{className:"space-y-2",children:s.questions.map((a,d)=>e.jsx("div",{className:"rounded-md border p-3",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-sm font-medium",children:["Question ",d+1,": ",a.title]}),e.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["Type: ",a.question_type," | Marks: ",a.marks]})]})})},a.id))}):e.jsx("div",{className:"px-4 py-3 text-center",children:e.jsx("p",{children:"No questions in this module"})})})]},s.id)})}):e.jsx("div",{className:"p-6 text-center",children:e.jsx("p",{children:"No modules available for this exam"})})})};export{g as default};