import{jsxs as m,jsx as r}from"react/jsx-runtime";import{Q as s}from"./question-type-badge-RCPhTljm.js";import{a,k as c,g as o,l as n}from"./ui-components-B24mpb8o.js";import d from"./fill-blank-question-DOV-yfWY.js";import u from"./listening-question-9mBqAS1m.js";import f from"./matching-question-CUsOQf_B.js";import h from"./mcq-question-CnnF7oDA.js";import y from"./multiple-select-question-BEjzt4ro.js";import Q from"./ordering-question-Bk97wzKC.js";import x from"./short-answer-question-DAuDwJ3c.js";import"lucide-react";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";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 mt=({question:t,questionNumber:p,answer:e,onAnswerChange:i})=>{const l=()=>{switch(t.question_type){case"multiple_choice":return r(h,{question:t,answer:e,onAnswerChange:i});case"multiple_select":return r(y,{question:t,answer:e,onAnswerChange:i});case"matching":return r(f,{question:t,answer:e,onAnswerChange:i});case"fill_blank":return r(d,{question:t,answer:e,onAnswerChange:i});case"ordering":return r(Q,{question:t,answer:e,onAnswerChange:i});case"short_answer":return r(x,{question:t,answer:e,onAnswerChange:i});case"listening":return r(u,{question:t,answer:e,onAnswerChange:i});default:return r("div",{className:"rounded-lg bg-yellow-50 p-4 text-center",children:m("p",{className:"text-sm text-yellow-800",children:['Question type "',t.question_type,'" is not yet implemented in the interface.']})})}};return m(a,{children:[r(c,{children:r("div",{className:"flex items-start justify-between",children:m("div",{className:"flex-1",children:[m("div",{className:"mb-3 flex items-center gap-2",children:[m(o,{variant:"outline",children:["Question ",p]}),r(s,{type:t.question_type}),m(o,{variant:"secondary",children:[t.marks," marks"]})]}),r("h3",{className:"text-lg font-semibold text-gray-900",children:t.title}),t.description&&r("div",{className:"prose prose-sm mt-2 max-w-none",dangerouslySetInnerHTML:{__html:t.description}})]})})}),r(n,{children:l()})]})};export{mt as default};
