import{jsx as t,Fragment as c,jsxs as r}from"react/jsx-runtime";import{D as d,E as h,F as u,G as x}from"./ui-components-B24mpb8o.js";import{usePage as N}from"@inertiajs/react";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"lucide-react";import"@radix-ui/react-avatar";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-scroll-area";import"@radix-ui/react-popover";import"@radix-ui/react-radio-group";import"@radix-ui/react-dialog";import"@radix-ui/react-slot";import"clsx";import"@radix-ui/react-separator";import"@radix-ui/react-tooltip";import"@radix-ui/react-tabs";import"@radix-ui/react-accordion";import"@radix-ui/react-progress";import"@radix-ui/react-select";import"cmdk";import"@radix-ui/react-switch";import"react-day-picker";import"@radix-ui/react-slider";import"embla-carousel-react";import"@radix-ui/react-toggle-group";import"vaul";import"tailwind-merge";const W=()=>{var s,m;const{props:n}=N(),{modules:i}=n;return t(c,{children:i&&i.length>0?t(d,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:(m=(s=i[0])==null?void 0:s.id)==null?void 0:m.toString(),children:i.map((e,p)=>{var a;return r(h,{value:((a=e.id)==null?void 0:a.toString())||p.toString(),className:"overflow-hidden rounded-lg border",children:[r(u,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[p+1,". ",e.title]}),t(x,{className:"space-y-2 p-2",children:e.questions&&e.questions.length>0?t("div",{className:"space-y-2",children:e.questions.map((o,l)=>t("div",{className:"rounded-md border p-3",children:t("div",{className:"flex items-start justify-between",children:r("div",{className:"flex-1",children:[r("p",{className:"text-sm font-medium",children:["Question ",l+1,": ",o.title]}),r("p",{className:"text-muted-foreground mt-1 text-xs",children:["Type: ",o.question_type," | Marks: ",o.marks]})]})})},o.id))}):t("div",{className:"px-4 py-3 text-center",children:t("p",{children:"No questions in this module"})})})]},e.id)})}):t("div",{className:"p-6 text-center",children:t("p",{children:"No modules available for this exam"})})})};export{W as default};
