analytica-frontend-lib 1.2.67 → 1.2.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/ActivityCardQuestionBanks/index.js +827 -244
  2. package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
  3. package/dist/ActivityCardQuestionBanks/index.mjs +828 -237
  4. package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
  5. package/dist/ActivityCardQuestionPreview/index.js +650 -67
  6. package/dist/ActivityCardQuestionPreview/index.js.map +1 -1
  7. package/dist/ActivityCardQuestionPreview/index.mjs +655 -64
  8. package/dist/ActivityCardQuestionPreview/index.mjs.map +1 -1
  9. package/dist/ActivityDetails/index.d.ts +6 -4
  10. package/dist/ActivityDetails/index.d.ts.map +1 -1
  11. package/dist/ActivityDetails/index.js +2381 -1007
  12. package/dist/ActivityDetails/index.js.map +1 -1
  13. package/dist/ActivityDetails/index.mjs +2352 -953
  14. package/dist/ActivityDetails/index.mjs.map +1 -1
  15. package/dist/ActivityPreview/index.js +1175 -592
  16. package/dist/ActivityPreview/index.js.map +1 -1
  17. package/dist/ActivityPreview/index.mjs +1171 -580
  18. package/dist/ActivityPreview/index.mjs.map +1 -1
  19. package/dist/CorrectActivityModal/index.d.ts +4 -2
  20. package/dist/CorrectActivityModal/index.d.ts.map +1 -1
  21. package/dist/CorrectActivityModal/index.js +1999 -527
  22. package/dist/CorrectActivityModal/index.js.map +1 -1
  23. package/dist/CorrectActivityModal/index.mjs +2030 -529
  24. package/dist/CorrectActivityModal/index.mjs.map +1 -1
  25. package/dist/Quiz/index.js +2 -0
  26. package/dist/Quiz/index.js.map +1 -1
  27. package/dist/Quiz/index.mjs +2 -0
  28. package/dist/Quiz/index.mjs.map +1 -1
  29. package/dist/hooks/useSendActivity/index.d.ts +47 -0
  30. package/dist/hooks/useSendActivity/index.d.ts.map +1 -0
  31. package/dist/hooks/useSendActivity/index.js +194 -0
  32. package/dist/hooks/useSendActivity/index.js.map +1 -0
  33. package/dist/hooks/useSendActivity/index.mjs +159 -0
  34. package/dist/hooks/useSendActivity/index.mjs.map +1 -0
  35. package/dist/hooks/useSendActivity.d.ts +47 -0
  36. package/dist/hooks/useSendActivity.d.ts.map +1 -0
  37. package/dist/index.d.ts +6 -2
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +10284 -9202
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +10170 -9087
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/types/activities/index.d.ts +81 -0
  44. package/dist/types/activities/index.d.ts.map +1 -0
  45. package/dist/types/activities/index.js +52 -0
  46. package/dist/types/activities/index.js.map +1 -0
  47. package/dist/types/activities/index.mjs +25 -0
  48. package/dist/types/activities/index.mjs.map +1 -0
  49. package/dist/types/activities.d.ts +81 -0
  50. package/dist/types/activities.d.ts.map +1 -0
  51. package/dist/types/sendActivity/index.d.ts +127 -0
  52. package/dist/types/sendActivity/index.d.ts.map +1 -0
  53. package/dist/types/sendActivity/index.js +19 -0
  54. package/dist/types/sendActivity/index.js.map +1 -0
  55. package/dist/types/sendActivity/index.mjs +1 -0
  56. package/dist/types/sendActivity/index.mjs.map +1 -0
  57. package/dist/types/sendActivity.d.ts +127 -0
  58. package/dist/types/sendActivity.d.ts.map +1 -0
  59. package/dist/utils/questionRenderer/alternative/index.d.ts +8 -0
  60. package/dist/utils/questionRenderer/alternative/index.d.ts.map +1 -0
  61. package/dist/utils/questionRenderer/components/index.d.ts +25 -0
  62. package/dist/utils/questionRenderer/components/index.d.ts.map +1 -0
  63. package/dist/utils/questionRenderer/connectDots/index.d.ts +8 -0
  64. package/dist/utils/questionRenderer/connectDots/index.d.ts.map +1 -0
  65. package/dist/utils/questionRenderer/dissertative/index.d.ts +8 -0
  66. package/dist/utils/questionRenderer/dissertative/index.d.ts.map +1 -0
  67. package/dist/utils/questionRenderer/fill/index.d.ts +10 -0
  68. package/dist/utils/questionRenderer/fill/index.d.ts.map +1 -0
  69. package/dist/utils/questionRenderer/image/index.d.ts +8 -0
  70. package/dist/utils/questionRenderer/image/index.d.ts.map +1 -0
  71. package/dist/utils/questionRenderer/index.d.ts +31 -0
  72. package/dist/utils/questionRenderer/index.d.ts.map +1 -0
  73. package/dist/utils/questionRenderer/multipleChoice/index.d.ts +8 -0
  74. package/dist/utils/questionRenderer/multipleChoice/index.d.ts.map +1 -0
  75. package/dist/utils/questionRenderer/trueOrFalse/index.d.ts +9 -0
  76. package/dist/utils/questionRenderer/trueOrFalse/index.d.ts.map +1 -0
  77. package/dist/utils/questionRenderer/types.d.ts +14 -0
  78. package/dist/utils/questionRenderer/types.d.ts.map +1 -0
  79. package/dist/utils/studentActivityCorrection/constants.d.ts +13 -0
  80. package/dist/utils/studentActivityCorrection/constants.d.ts.map +1 -0
  81. package/dist/utils/studentActivityCorrection/converter.d.ts +13 -0
  82. package/dist/utils/studentActivityCorrection/converter.d.ts.map +1 -0
  83. package/dist/utils/studentActivityCorrection/index.d.ts +13 -0
  84. package/dist/utils/studentActivityCorrection/index.d.ts.map +1 -0
  85. package/dist/utils/studentActivityCorrection/types.d.ts +84 -0
  86. package/dist/utils/studentActivityCorrection/types.d.ts.map +1 -0
  87. package/dist/utils/studentActivityCorrection/utils.d.ts +30 -0
  88. package/dist/utils/studentActivityCorrection/utils.d.ts.map +1 -0
  89. package/package.json +1 -1
  90. package/dist/types/studentActivityCorrection.d.ts +0 -62
  91. package/dist/types/studentActivityCorrection.d.ts.map +0 -1
  92. package/dist/utils/questionRenderer.d.ts +0 -5
  93. package/dist/utils/questionRenderer.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  // src/components/ActivityCardQuestionPreview/ActivityCardQuestionPreview.tsx
2
- import { useMemo, useState as useState7 } from "react";
2
+ import { useMemo as useMemo2, useState as useState8 } from "react";
3
3
 
4
4
  // src/components/Accordation/Accordation.tsx
5
5
  import {
@@ -3028,7 +3028,7 @@ var AlternativesList = ({
3028
3028
  const groupName = name || `alternatives-${uniqueId}`;
3029
3029
  const [actualValue, setActualValue] = useState5(value);
3030
3030
  const isReadonly = mode === "readonly";
3031
- const getStatusStyles = (status, isReadonly2) => {
3031
+ const getStatusStyles2 = (status, isReadonly2) => {
3032
3032
  const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
3033
3033
  switch (status) {
3034
3034
  case "correct":
@@ -3039,7 +3039,7 @@ var AlternativesList = ({
3039
3039
  return `bg-background border-border-100 ${hoverClass}`;
3040
3040
  }
3041
3041
  };
3042
- const getStatusBadge = (status) => {
3042
+ const getStatusBadge2 = (status) => {
3043
3043
  switch (status) {
3044
3044
  case "correct":
3045
3045
  return /* @__PURE__ */ jsx14(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx14(CheckCircle2, {}), children: "Resposta correta" });
@@ -3069,8 +3069,8 @@ var AlternativesList = ({
3069
3069
  } else if (isCorrectAnswer) {
3070
3070
  displayStatus = "correct";
3071
3071
  }
3072
- const statusStyles = getStatusStyles(displayStatus, true);
3073
- const statusBadge = getStatusBadge(displayStatus);
3072
+ const statusStyles = getStatusStyles2(displayStatus, true);
3073
+ const statusBadge = getStatusBadge2(displayStatus);
3074
3074
  const renderRadio = () => {
3075
3075
  const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
3076
3076
  const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
@@ -3161,8 +3161,8 @@ var AlternativesList = ({
3161
3161
  className: cn("flex flex-col", getLayoutClasses(), className),
3162
3162
  children: alternatives.map((alternative, index) => {
3163
3163
  const alternativeId = alternative.value || `alt-${index}`;
3164
- const statusStyles = getStatusStyles(alternative.status, false);
3165
- const statusBadge = getStatusBadge(alternative.status);
3164
+ const statusStyles = getStatusStyles2(alternative.status, false);
3165
+ const statusBadge = getStatusBadge2(alternative.status);
3166
3166
  if (layout === "detailed") {
3167
3167
  return /* @__PURE__ */ jsx14(
3168
3168
  "div",
@@ -3268,21 +3268,56 @@ var HeaderAlternative = forwardRef6(
3268
3268
  }
3269
3269
  );
3270
3270
 
3271
- // src/types/questionTypes.ts
3272
- var questionTypeLabels = {
3273
- ["ALTERNATIVA" /* ALTERNATIVA */]: "Alternativa",
3274
- ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: "Verdadeiro ou Falso",
3275
- ["DISSERTATIVA" /* DISSERTATIVA */]: "Discursiva",
3276
- ["IMAGEM" /* IMAGEM */]: "Imagem",
3277
- ["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: "M\xFAltipla Escolha",
3278
- ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: "Ligar Pontos",
3279
- ["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
3271
+ // src/utils/questionRenderer/alternative/index.tsx
3272
+ import { jsx as jsx15 } from "react/jsx-runtime";
3273
+ var renderQuestionAlternative = ({
3274
+ question,
3275
+ result
3276
+ }) => {
3277
+ const alternatives = question.options?.map((option) => {
3278
+ const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
3279
+ const isSelected = result?.selectedOptions?.some(
3280
+ (selectedOption) => selectedOption.optionId === option.id
3281
+ ) || false;
3282
+ const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */;
3283
+ let status;
3284
+ if (shouldShowCorrectAnswers) {
3285
+ if (isCorrectOption) {
3286
+ status = "correct" /* CORRECT */;
3287
+ } else if (isSelected && !isCorrectOption) {
3288
+ status = "incorrect" /* INCORRECT */;
3289
+ } else {
3290
+ status = "neutral" /* NEUTRAL */;
3291
+ }
3292
+ } else {
3293
+ status = "neutral" /* NEUTRAL */;
3294
+ }
3295
+ return {
3296
+ label: option.option,
3297
+ value: option.id,
3298
+ status
3299
+ };
3300
+ });
3301
+ if (!alternatives || alternatives.length === 0) {
3302
+ return /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsx15(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Alternativas" }) });
3303
+ }
3304
+ return /* @__PURE__ */ jsx15("div", { className: "pt-2", children: /* @__PURE__ */ jsx15(
3305
+ AlternativesList,
3306
+ {
3307
+ mode: "readonly",
3308
+ name: `question-${question.id}`,
3309
+ layout: "compact",
3310
+ alternatives,
3311
+ selectedValue: result?.selectedOptions?.[0]?.optionId || ""
3312
+ },
3313
+ `question-${question.id}`
3314
+ ) });
3280
3315
  };
3281
3316
 
3282
3317
  // src/components/MultipleChoice/MultipleChoice.tsx
3283
3318
  import { useEffect as useEffect5, useState as useState6 } from "react";
3284
3319
  import { CheckCircle as CheckCircle3, XCircle as XCircle3, Check as Check2 } from "phosphor-react";
3285
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
3320
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
3286
3321
  var MultipleChoiceList = ({
3287
3322
  disabled = false,
3288
3323
  className = "",
@@ -3296,17 +3331,17 @@ var MultipleChoiceList = ({
3296
3331
  useEffect5(() => {
3297
3332
  setActualValue(selectedValues);
3298
3333
  }, [selectedValues]);
3299
- const getStatusBadge = (status) => {
3334
+ const getStatusBadge2 = (status) => {
3300
3335
  switch (status) {
3301
3336
  case "correct":
3302
- return /* @__PURE__ */ jsx15(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx15(CheckCircle3, {}), children: "Resposta correta" });
3337
+ return /* @__PURE__ */ jsx16(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx16(CheckCircle3, {}), children: "Resposta correta" });
3303
3338
  case "incorrect":
3304
- return /* @__PURE__ */ jsx15(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx15(XCircle3, {}), children: "Resposta incorreta" });
3339
+ return /* @__PURE__ */ jsx16(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx16(XCircle3, {}), children: "Resposta incorreta" });
3305
3340
  default:
3306
3341
  return null;
3307
3342
  }
3308
3343
  };
3309
- const getStatusStyles = (status) => {
3344
+ const getStatusStyles2 = (status) => {
3310
3345
  switch (status) {
3311
3346
  case "correct":
3312
3347
  return "bg-success-background border-success-300";
@@ -3322,13 +3357,13 @@ var MultipleChoiceList = ({
3322
3357
  isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
3323
3358
  isDisabled && "opacity-40 cursor-not-allowed"
3324
3359
  );
3325
- return /* @__PURE__ */ jsx15("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx15(Check2, { size: 16, weight: "bold" }) });
3360
+ return /* @__PURE__ */ jsx16("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx16(Check2, { size: 16, weight: "bold" }) });
3326
3361
  };
3327
3362
  if (mode === "readonly") {
3328
- return /* @__PURE__ */ jsx15("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
3363
+ return /* @__PURE__ */ jsx16("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
3329
3364
  const isSelected = actualValue?.includes(choice.value) || false;
3330
- const statusStyles = getStatusStyles(choice.status);
3331
- const statusBadge = getStatusBadge(choice.status);
3365
+ const statusStyles = getStatusStyles2(choice.status);
3366
+ const statusBadge = getStatusBadge2(choice.status);
3332
3367
  return /* @__PURE__ */ jsxs12(
3333
3368
  "div",
3334
3369
  {
@@ -3340,7 +3375,7 @@ var MultipleChoiceList = ({
3340
3375
  children: [
3341
3376
  /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 flex-1", children: [
3342
3377
  renderVisualCheckbox(isSelected, choice.disabled || disabled),
3343
- /* @__PURE__ */ jsx15(
3378
+ /* @__PURE__ */ jsx16(
3344
3379
  "span",
3345
3380
  {
3346
3381
  className: cn(
@@ -3352,14 +3387,14 @@ var MultipleChoiceList = ({
3352
3387
  }
3353
3388
  )
3354
3389
  ] }),
3355
- statusBadge && /* @__PURE__ */ jsx15("div", { className: "flex-shrink-0", children: statusBadge })
3390
+ statusBadge && /* @__PURE__ */ jsx16("div", { className: "flex-shrink-0", children: statusBadge })
3356
3391
  ]
3357
3392
  },
3358
3393
  `readonly-${choice.value}-${i}`
3359
3394
  );
3360
3395
  }) });
3361
3396
  }
3362
- return /* @__PURE__ */ jsx15(
3397
+ return /* @__PURE__ */ jsx16(
3363
3398
  "div",
3364
3399
  {
3365
3400
  className: cn(
@@ -3367,7 +3402,7 @@ var MultipleChoiceList = ({
3367
3402
  disabled ? "opacity-50 cursor-not-allowed" : "",
3368
3403
  className
3369
3404
  ),
3370
- children: /* @__PURE__ */ jsx15(
3405
+ children: /* @__PURE__ */ jsx16(
3371
3406
  CheckboxList_default,
3372
3407
  {
3373
3408
  name,
@@ -3382,7 +3417,7 @@ var MultipleChoiceList = ({
3382
3417
  {
3383
3418
  className: "flex flex-row gap-2 items-center",
3384
3419
  children: [
3385
- /* @__PURE__ */ jsx15(
3420
+ /* @__PURE__ */ jsx16(
3386
3421
  CheckboxListItem,
3387
3422
  {
3388
3423
  value: choice.value,
@@ -3390,7 +3425,7 @@ var MultipleChoiceList = ({
3390
3425
  disabled: choice.disabled || disabled
3391
3426
  }
3392
3427
  ),
3393
- /* @__PURE__ */ jsx15(
3428
+ /* @__PURE__ */ jsx16(
3394
3429
  "label",
3395
3430
  {
3396
3431
  htmlFor: `interactive-${choice.value}-${i}`,
@@ -3412,32 +3447,588 @@ var MultipleChoiceList = ({
3412
3447
  );
3413
3448
  };
3414
3449
 
3415
- // src/utils/questionRenderer.ts
3450
+ // src/utils/questionRenderer/multipleChoice/index.tsx
3451
+ import { jsx as jsx17 } from "react/jsx-runtime";
3452
+ var renderQuestionMultipleChoice = ({
3453
+ question,
3454
+ result
3455
+ }) => {
3456
+ const choices = question.options?.map((option) => {
3457
+ const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
3458
+ const isSelected = result?.selectedOptions?.some(
3459
+ (op) => op.optionId === option.id
3460
+ );
3461
+ const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
3462
+ let status;
3463
+ if (shouldShowCorrectAnswers) {
3464
+ if (isCorrectOption) {
3465
+ status = "correct" /* CORRECT */;
3466
+ } else if (isSelected && !isCorrectOption) {
3467
+ status = "incorrect" /* INCORRECT */;
3468
+ } else {
3469
+ status = "neutral" /* NEUTRAL */;
3470
+ }
3471
+ } else {
3472
+ status = "neutral" /* NEUTRAL */;
3473
+ }
3474
+ return {
3475
+ label: option.option,
3476
+ value: option.id,
3477
+ status
3478
+ };
3479
+ });
3480
+ if (!choices || choices.length === 0) {
3481
+ return /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Escolhas M\xFAltiplas" }) });
3482
+ }
3483
+ const selectedValues = result?.selectedOptions?.map((op) => op.optionId) || [];
3484
+ return /* @__PURE__ */ jsx17("div", { className: "pt-2", children: /* @__PURE__ */ jsx17(
3485
+ MultipleChoiceList,
3486
+ {
3487
+ mode: "readonly",
3488
+ name: `question-${question.id}`,
3489
+ choices,
3490
+ selectedValues
3491
+ },
3492
+ `question-${question.id}`
3493
+ ) });
3494
+ };
3495
+
3496
+ // src/components/Quiz/QuizContent.tsx
3497
+ import {
3498
+ forwardRef as forwardRef7,
3499
+ useCallback,
3500
+ useEffect as useEffect6,
3501
+ useId as useId6,
3502
+ useMemo,
3503
+ useRef as useRef4,
3504
+ useState as useState7
3505
+ } from "react";
3506
+ import { CheckCircle as CheckCircle4, XCircle as XCircle4 } from "phosphor-react";
3507
+
3508
+ // src/assets/img/mock-image-question.png
3509
+ var mock_image_question_default = "../mock-image-question-HEZCLFDL.png";
3510
+
3511
+ // src/components/Quiz/QuizContent.tsx
3512
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
3513
+ var getStatusStyles = (variantCorrect) => {
3514
+ switch (variantCorrect) {
3515
+ case "correct":
3516
+ return "bg-success-background border-success-300";
3517
+ case "incorrect":
3518
+ return "bg-error-background border-error-300";
3519
+ default:
3520
+ return "";
3521
+ }
3522
+ };
3523
+ var QuizSubTitle = forwardRef7(
3524
+ ({ subTitle, ...props }, ref) => {
3525
+ return /* @__PURE__ */ jsx18("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx18("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
3526
+ }
3527
+ );
3528
+ var QuizContainer = forwardRef7(({ children, className, ...props }, ref) => {
3529
+ return /* @__PURE__ */ jsx18(
3530
+ "div",
3531
+ {
3532
+ ref,
3533
+ className: cn(
3534
+ "bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
3535
+ className
3536
+ ),
3537
+ ...props,
3538
+ children
3539
+ }
3540
+ );
3541
+ });
3542
+
3543
+ // src/utils/questionRenderer/components/index.tsx
3544
+ import { useId as useId7 } from "react";
3545
+ import { CheckCircle as CheckCircle5, XCircle as XCircle5 } from "phosphor-react";
3546
+ import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
3547
+ var getStatusBadge = (status) => {
3548
+ switch (status) {
3549
+ case "correct":
3550
+ return /* @__PURE__ */ jsx19(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx19(CheckCircle5, {}), children: "Resposta correta" });
3551
+ case "incorrect":
3552
+ return /* @__PURE__ */ jsx19(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx19(XCircle5, {}), children: "Resposta incorreta" });
3553
+ default:
3554
+ return null;
3555
+ }
3556
+ };
3557
+ var QuestionContainer = ({
3558
+ children,
3559
+ className
3560
+ }) => {
3561
+ return /* @__PURE__ */ jsx19(
3562
+ "div",
3563
+ {
3564
+ className: cn(
3565
+ "bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
3566
+ className
3567
+ ),
3568
+ children
3569
+ }
3570
+ );
3571
+ };
3572
+ var QuestionSubTitle = ({ subTitle }) => {
3573
+ return /* @__PURE__ */ jsx19("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx19(Text_default, { size: "md", weight: "bold", color: "text-text-950", children: subTitle }) });
3574
+ };
3575
+ var FillQuestionContent = ({
3576
+ question,
3577
+ result
3578
+ }) => {
3579
+ const text = question.statement || "";
3580
+ const baseId = useId7();
3581
+ const studentAnswers = {};
3582
+ try {
3583
+ if (result?.answer) {
3584
+ const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
3585
+ if (typeof parsed === "object") {
3586
+ Object.assign(studentAnswers, parsed);
3587
+ }
3588
+ }
3589
+ } catch (error) {
3590
+ console.error("Error parsing answer:", error);
3591
+ }
3592
+ const regex = /\{\{([\p{L}\p{M}\d_]+)\}\}/gu;
3593
+ const placeholders = [];
3594
+ let match;
3595
+ while ((match = regex.exec(text)) !== null) {
3596
+ placeholders.push(match[1]);
3597
+ }
3598
+ const correctAnswers = {};
3599
+ placeholders.forEach((placeholder) => {
3600
+ correctAnswers[placeholder] = studentAnswers[placeholder]?.correctAnswer || `[${placeholder}]`;
3601
+ });
3602
+ const addTextElement = (elements, textContent, elementCounter) => {
3603
+ if (textContent) {
3604
+ elements.push({
3605
+ element: textContent,
3606
+ id: `${baseId}-text-${++elementCounter.current}`
3607
+ });
3608
+ }
3609
+ };
3610
+ const renderGabaritoPlaceholder = (selectId, elementCounter) => {
3611
+ const correctAnswer = correctAnswers[selectId] || `[${selectId}]`;
3612
+ return {
3613
+ element: /* @__PURE__ */ jsx19(
3614
+ Text_default,
3615
+ {
3616
+ size: "md",
3617
+ weight: "semibold",
3618
+ color: "text-success-600",
3619
+ className: "inline-flex mb-2.5 border-b-2 border-success-600",
3620
+ children: correctAnswer
3621
+ },
3622
+ `${baseId}-gabarito-${selectId}`
3623
+ ),
3624
+ id: `${baseId}-gabarito-${++elementCounter.current}`
3625
+ };
3626
+ };
3627
+ const renderStudentPlaceholder = (selectId, elementCounter) => {
3628
+ const studentAnswer = studentAnswers[selectId];
3629
+ if (!studentAnswer) {
3630
+ return {
3631
+ element: /* @__PURE__ */ jsx19(
3632
+ Text_default,
3633
+ {
3634
+ size: "md",
3635
+ weight: "normal",
3636
+ color: "text-text-400",
3637
+ className: "inline-flex mb-2.5 border-b-2 border-text-300",
3638
+ children: "[N\xE3o respondido]"
3639
+ },
3640
+ `${baseId}-no-answer-${selectId}`
3641
+ ),
3642
+ id: `${baseId}-no-answer-${++elementCounter.current}`
3643
+ };
3644
+ }
3645
+ const isCorrect = studentAnswer.isCorrect;
3646
+ const colorClass = isCorrect ? "text-success-600 border-success-600" : "text-error-600 border-error-600";
3647
+ return {
3648
+ element: /* @__PURE__ */ jsx19(
3649
+ Badge_default,
3650
+ {
3651
+ variant: "solid",
3652
+ action: isCorrect ? "success" : "error",
3653
+ iconRight: isCorrect ? /* @__PURE__ */ jsx19(CheckCircle5, {}) : /* @__PURE__ */ jsx19(XCircle5, {}),
3654
+ size: "large",
3655
+ className: `py-3 w-[180px] justify-between mb-2.5 ${colorClass}`,
3656
+ children: /* @__PURE__ */ jsx19("span", { className: "text-text-900", children: studentAnswer.answer })
3657
+ },
3658
+ `${baseId}-answer-${selectId}`
3659
+ ),
3660
+ id: `${baseId}-answer-${++elementCounter.current}`
3661
+ };
3662
+ };
3663
+ const renderTextWithAnswers = (isGabarito = false) => {
3664
+ const elements = [];
3665
+ let lastIndex = 0;
3666
+ const elementCounter = { current: 0 };
3667
+ regex.lastIndex = 0;
3668
+ while ((match = regex.exec(text)) !== null) {
3669
+ const [fullMatch, selectId] = match;
3670
+ const startIndex = match.index;
3671
+ if (startIndex > lastIndex) {
3672
+ addTextElement(
3673
+ elements,
3674
+ text.slice(lastIndex, startIndex),
3675
+ elementCounter
3676
+ );
3677
+ }
3678
+ const placeholderElement = isGabarito ? renderGabaritoPlaceholder(selectId, elementCounter) : renderStudentPlaceholder(selectId, elementCounter);
3679
+ elements.push(placeholderElement);
3680
+ lastIndex = match.index + fullMatch.length;
3681
+ }
3682
+ if (lastIndex < text.length) {
3683
+ addTextElement(elements, text.slice(lastIndex), elementCounter);
3684
+ }
3685
+ return elements;
3686
+ };
3687
+ return /* @__PURE__ */ jsxs14("div", { className: "pt-2 space-y-4", children: [
3688
+ /* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
3689
+ /* @__PURE__ */ jsx19(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Resposta do aluno:" }),
3690
+ /* @__PURE__ */ jsx19("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx19("div", { className: "leading-8", children: renderTextWithAnswers(false).map((element) => /* @__PURE__ */ jsx19(
3691
+ Text_default,
3692
+ {
3693
+ size: "md",
3694
+ weight: "normal",
3695
+ color: "text-text-900",
3696
+ children: element.element
3697
+ },
3698
+ element.id
3699
+ )) }) })
3700
+ ] }),
3701
+ /* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
3702
+ /* @__PURE__ */ jsx19(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Gabarito:" }),
3703
+ /* @__PURE__ */ jsx19("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx19("div", { className: "leading-8", children: renderTextWithAnswers(true).map((element) => /* @__PURE__ */ jsx19(
3704
+ Text_default,
3705
+ {
3706
+ size: "md",
3707
+ weight: "normal",
3708
+ color: "text-text-900",
3709
+ children: element.element
3710
+ },
3711
+ element.id
3712
+ )) }) })
3713
+ ] })
3714
+ ] });
3715
+ };
3716
+
3717
+ // src/utils/questionRenderer/trueOrFalse/index.tsx
3718
+ import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
3719
+ var renderQuestionTrueOrFalse = ({
3720
+ question,
3721
+ result
3722
+ }) => {
3723
+ const options = question.options || [];
3724
+ const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
3725
+ const shouldShowStatus = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
3726
+ return /* @__PURE__ */ jsx20("div", { className: "pt-2", children: /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
3727
+ const statementIsTrue = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
3728
+ const isSelected = result?.selectedOptions?.some(
3729
+ (op) => op.optionId === option.id
3730
+ );
3731
+ const isStudentCorrect = statementIsTrue === isSelected;
3732
+ const variantCorrect = statementIsTrue ? "correct" : "incorrect";
3733
+ const studentAnswer = isSelected ? "V" : "F";
3734
+ const correctAnswer = statementIsTrue ? "V" : "F";
3735
+ return /* @__PURE__ */ jsxs15(
3736
+ "section",
3737
+ {
3738
+ className: "flex flex-col gap-2",
3739
+ children: [
3740
+ /* @__PURE__ */ jsxs15(
3741
+ "div",
3742
+ {
3743
+ className: cn(
3744
+ "flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
3745
+ shouldShowStatus ? getStatusStyles(variantCorrect) : ""
3746
+ ),
3747
+ children: [
3748
+ /* @__PURE__ */ jsx20(Text_default, { size: "sm", weight: "normal", color: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
3749
+ shouldShowStatus && /* @__PURE__ */ jsx20("div", { className: "flex-shrink-0", children: getStatusBadge(isStudentCorrect ? "correct" : "incorrect") })
3750
+ ]
3751
+ }
3752
+ ),
3753
+ shouldShowStatus && /* @__PURE__ */ jsxs15("span", { className: "flex flex-row gap-2 items-center", children: [
3754
+ /* @__PURE__ */ jsxs15(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
3755
+ "Resposta selecionada: ",
3756
+ studentAnswer
3757
+ ] }),
3758
+ !isStudentCorrect && /* @__PURE__ */ jsxs15(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
3759
+ "Resposta correta: ",
3760
+ correctAnswer
3761
+ ] })
3762
+ ] })
3763
+ ]
3764
+ },
3765
+ option.id || `option-${index}`
3766
+ );
3767
+ }) }) });
3768
+ };
3769
+
3770
+ // src/utils/questionRenderer/dissertative/index.tsx
3771
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
3772
+ var renderQuestionDissertative = ({
3773
+ result
3774
+ }) => {
3775
+ const localAnswer = result?.answer || "";
3776
+ return /* @__PURE__ */ jsxs16("div", { className: "pt-2 space-y-4", children: [
3777
+ /* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
3778
+ /* @__PURE__ */ jsx21(Text_default, { size: "sm", weight: "normal", color: "text-text-950", children: "Resposta do aluno" }),
3779
+ /* @__PURE__ */ jsx21("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx21(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: localAnswer || "Nenhuma resposta fornecida" }) })
3780
+ ] }),
3781
+ result?.answerStatus === "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && result?.teacherFeedback && /* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
3782
+ /* @__PURE__ */ jsx21(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Observa\xE7\xE3o do professor:" }),
3783
+ /* @__PURE__ */ jsx21("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx21(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: result.teacherFeedback }) })
3784
+ ] })
3785
+ ] });
3786
+ };
3787
+
3788
+ // src/utils/questionRenderer/fill/index.tsx
3789
+ import { jsx as jsx22 } from "react/jsx-runtime";
3790
+ var renderQuestionFill = ({
3791
+ question,
3792
+ result
3793
+ }) => {
3794
+ return /* @__PURE__ */ jsx22(FillQuestionContent, { question, result });
3795
+ };
3796
+
3797
+ // src/utils/questionRenderer/image/index.tsx
3798
+ import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
3799
+ var renderQuestionImage = ({
3800
+ result
3801
+ }) => {
3802
+ const correctPositionRelative = { x: 0.48, y: 0.45 };
3803
+ const correctRadiusRelative = 0.1;
3804
+ let userPositionRelative = null;
3805
+ try {
3806
+ if (result?.answer) {
3807
+ const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
3808
+ if (parsed && typeof parsed.x === "number" && typeof parsed.y === "number") {
3809
+ userPositionRelative = { x: parsed.x, y: parsed.y };
3810
+ }
3811
+ }
3812
+ } catch {
3813
+ userPositionRelative = null;
3814
+ }
3815
+ const isCorrect = userPositionRelative ? Math.sqrt(
3816
+ Math.pow(userPositionRelative.x - correctPositionRelative.x, 2) + Math.pow(userPositionRelative.y - correctPositionRelative.y, 2)
3817
+ ) <= correctRadiusRelative : false;
3818
+ const getUserCircleColorClasses = () => {
3819
+ if (!userPositionRelative) return "";
3820
+ return isCorrect ? "bg-success-600/70 border-white" : "bg-indicator-error/70 border-white";
3821
+ };
3822
+ const getPositionDescription = (x, y) => {
3823
+ const xPercent = Math.round(x * 100);
3824
+ const yPercent = Math.round(y * 100);
3825
+ return `${xPercent}% da esquerda, ${yPercent}% do topo`;
3826
+ };
3827
+ const getSpatialRelationship = () => {
3828
+ if (!userPositionRelative) {
3829
+ return `\xC1rea correta localizada em ${getPositionDescription(
3830
+ correctPositionRelative.x,
3831
+ correctPositionRelative.y
3832
+ )}. Nenhuma resposta do aluno fornecida.`;
3833
+ }
3834
+ const deltaX = userPositionRelative.x - correctPositionRelative.x;
3835
+ const deltaY = userPositionRelative.y - correctPositionRelative.y;
3836
+ const distance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
3837
+ const distancePercent = Math.round(distance * 100);
3838
+ let direction = "";
3839
+ if (Math.abs(deltaX) > Math.abs(deltaY)) {
3840
+ direction = deltaX > 0 ? "\xE0 direita" : "\xE0 esquerda";
3841
+ } else {
3842
+ direction = deltaY > 0 ? "abaixo" : "acima";
3843
+ }
3844
+ const correctPos = getPositionDescription(
3845
+ correctPositionRelative.x,
3846
+ correctPositionRelative.y
3847
+ );
3848
+ const userPos = getPositionDescription(
3849
+ userPositionRelative.x,
3850
+ userPositionRelative.y
3851
+ );
3852
+ return `\xC1rea correta localizada em ${correctPos}. Resposta do aluno em ${userPos}. A resposta do aluno est\xE1 ${distancePercent}% de dist\xE2ncia ${direction} da \xE1rea correta. ${isCorrect ? "A resposta est\xE1 dentro da \xE1rea de toler\xE2ncia e \xE9 considerada correta." : "A resposta est\xE1 fora da \xE1rea de toler\xE2ncia e \xE9 considerada incorreta."}`;
3853
+ };
3854
+ const correctPositionDescription = getPositionDescription(
3855
+ correctPositionRelative.x,
3856
+ correctPositionRelative.y
3857
+ );
3858
+ const imageAltText = `Quest\xE3o de imagem com \xE1rea correta localizada em ${correctPositionDescription}`;
3859
+ return /* @__PURE__ */ jsxs17("div", { className: "pt-2 space-y-4", children: [
3860
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-4 text-xs", children: [
3861
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3862
+ /* @__PURE__ */ jsx23("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
3863
+ /* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "\xC1rea correta" })
3864
+ ] }),
3865
+ userPositionRelative && /* @__PURE__ */ jsxs17(Fragment5, { children: [
3866
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3867
+ /* @__PURE__ */ jsx23("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
3868
+ /* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta correta" })
3869
+ ] }),
3870
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
3871
+ /* @__PURE__ */ jsx23("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
3872
+ /* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta incorreta" })
3873
+ ] })
3874
+ ] })
3875
+ ] }),
3876
+ /* @__PURE__ */ jsxs17("div", { className: "relative w-full", children: [
3877
+ /* @__PURE__ */ jsx23("div", { className: "sr-only", children: getSpatialRelationship() }),
3878
+ /* @__PURE__ */ jsx23(
3879
+ "img",
3880
+ {
3881
+ src: mock_image_question_default,
3882
+ alt: imageAltText,
3883
+ className: "w-full h-auto rounded-md"
3884
+ }
3885
+ ),
3886
+ /* @__PURE__ */ jsx23(
3887
+ "div",
3888
+ {
3889
+ role: "img",
3890
+ "aria-label": `\xC1rea correta marcada em ${correctPositionDescription}`,
3891
+ className: "absolute rounded-full bg-indicator-primary/70 border-4 border-[#F8CC2E] pointer-events-none",
3892
+ style: {
3893
+ minWidth: "50px",
3894
+ maxWidth: "160px",
3895
+ width: "15%",
3896
+ aspectRatio: "1 / 1",
3897
+ left: `calc(${correctPositionRelative.x * 100}% - 7.5%)`,
3898
+ top: `calc(${correctPositionRelative.y * 100}% - 15%)`
3899
+ },
3900
+ children: /* @__PURE__ */ jsxs17(
3901
+ Text_default,
3902
+ {
3903
+ size: "sm",
3904
+ weight: "normal",
3905
+ color: "text-text-600",
3906
+ className: "sr-only",
3907
+ children: [
3908
+ "C\xEDrculo amarelo indicando a \xE1rea correta da resposta, posicionado em",
3909
+ " ",
3910
+ correctPositionDescription
3911
+ ]
3912
+ }
3913
+ )
3914
+ }
3915
+ ),
3916
+ userPositionRelative && /* @__PURE__ */ jsx23(
3917
+ "div",
3918
+ {
3919
+ role: "img",
3920
+ "aria-label": `Resposta do aluno marcada em ${getPositionDescription(
3921
+ userPositionRelative.x,
3922
+ userPositionRelative.y
3923
+ )}, ${isCorrect ? "correta" : "incorreta"}`,
3924
+ className: `absolute rounded-full border-4 pointer-events-none ${getUserCircleColorClasses()}`,
3925
+ style: {
3926
+ minWidth: "30px",
3927
+ maxWidth: "52px",
3928
+ width: "5%",
3929
+ aspectRatio: "1 / 1",
3930
+ left: `calc(${userPositionRelative.x * 100}% - 2.5%)`,
3931
+ top: `calc(${userPositionRelative.y * 100}% - 2.5%)`
3932
+ },
3933
+ children: /* @__PURE__ */ jsxs17(
3934
+ Text_default,
3935
+ {
3936
+ size: "sm",
3937
+ weight: "normal",
3938
+ color: "text-text-600",
3939
+ className: "sr-only",
3940
+ children: [
3941
+ "C\xEDrculo ",
3942
+ isCorrect ? "verde" : "vermelho",
3943
+ " indicando a resposta do aluno, posicionado em",
3944
+ " ",
3945
+ getPositionDescription(
3946
+ userPositionRelative.x,
3947
+ userPositionRelative.y
3948
+ ),
3949
+ ". A resposta est\xE1",
3950
+ " ",
3951
+ Math.round(
3952
+ Math.sqrt(
3953
+ Math.pow(
3954
+ userPositionRelative.x - correctPositionRelative.x,
3955
+ 2
3956
+ ) + Math.pow(
3957
+ userPositionRelative.y - correctPositionRelative.y,
3958
+ 2
3959
+ )
3960
+ ) * 100
3961
+ ),
3962
+ "% de dist\xE2ncia da \xE1rea correta e \xE9 considerada",
3963
+ " ",
3964
+ isCorrect ? "correta" : "incorreta",
3965
+ "."
3966
+ ]
3967
+ }
3968
+ )
3969
+ }
3970
+ )
3971
+ ] })
3972
+ ] });
3973
+ };
3974
+
3975
+ // src/utils/questionRenderer/connectDots/index.tsx
3976
+ import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
3977
+ var renderQuestionConnectDots = ({
3978
+ paddingBottom
3979
+ } = {}) => {
3980
+ return /* @__PURE__ */ jsxs18(Fragment6, { children: [
3981
+ /* @__PURE__ */ jsx24(QuestionSubTitle, { subTitle: "Tipo de quest\xE3o: Ligar Pontos" }),
3982
+ /* @__PURE__ */ jsx24(QuestionContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx24("div", { className: "space-y-4", children: /* @__PURE__ */ jsx24(Text_default, { size: "md", weight: "normal", color: "text-text-600", children: "Tipo de quest\xE3o: Ligar Pontos (n\xE3o implementado)" }) }) })
3983
+ ] });
3984
+ };
3985
+
3986
+ // src/utils/questionRenderer/index.tsx
3987
+ var questionRendererMap = {
3988
+ ["ALTERNATIVA" /* ALTERNATIVA */]: renderQuestionAlternative,
3989
+ ["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderQuestionMultipleChoice,
3990
+ ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderQuestionTrueOrFalse,
3991
+ ["DISSERTATIVA" /* DISSERTATIVA */]: renderQuestionDissertative,
3992
+ ["PREENCHER" /* PREENCHER */]: renderQuestionFill,
3993
+ ["IMAGEM" /* IMAGEM */]: renderQuestionImage,
3994
+ ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderQuestionConnectDots
3995
+ };
3416
3996
  var renderFromMap = (renderers, questionType) => {
3417
3997
  if (!questionType) return null;
3418
3998
  const renderer = renderers[questionType];
3419
3999
  return renderer ? renderer() : null;
3420
4000
  };
3421
4001
 
4002
+ // src/types/questionTypes.ts
4003
+ var questionTypeLabels = {
4004
+ ["ALTERNATIVA" /* ALTERNATIVA */]: "Alternativa",
4005
+ ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: "Verdadeiro ou Falso",
4006
+ ["DISSERTATIVA" /* DISSERTATIVA */]: "Discursiva",
4007
+ ["IMAGEM" /* IMAGEM */]: "Imagem",
4008
+ ["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: "M\xFAltipla Escolha",
4009
+ ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: "Ligar Pontos",
4010
+ ["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
4011
+ };
4012
+
3422
4013
  // src/components/ActivityCardQuestionPreview/ActivityCardQuestionPreview.tsx
3423
- import { CheckCircle as CheckCircle4, XCircle as XCircle4 } from "phosphor-react";
3424
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
4014
+ import { CheckCircle as CheckCircle6, XCircle as XCircle6 } from "phosphor-react";
4015
+ import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
3425
4016
  var QuestionHeader = ({
3426
4017
  badgeColor,
3427
4018
  iconName,
3428
4019
  subjectName,
3429
4020
  resolvedQuestionTypeLabel,
3430
4021
  position
3431
- }) => /* @__PURE__ */ jsxs13("div", { className: "flex flex-row gap-2 text-text-650", children: [
3432
- /* @__PURE__ */ jsxs13("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
3433
- /* @__PURE__ */ jsx16(
4022
+ }) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-row gap-2 text-text-650", children: [
4023
+ /* @__PURE__ */ jsxs19("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
4024
+ /* @__PURE__ */ jsx25(
3434
4025
  "span",
3435
4026
  {
3436
4027
  className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
3437
4028
  style: {
3438
4029
  backgroundColor: badgeColor
3439
4030
  },
3440
- children: /* @__PURE__ */ jsx16(
4031
+ children: /* @__PURE__ */ jsx25(
3441
4032
  IconRender_default,
3442
4033
  {
3443
4034
  iconName: iconName ?? "Book",
@@ -3447,13 +4038,13 @@ var QuestionHeader = ({
3447
4038
  )
3448
4039
  }
3449
4040
  ),
3450
- /* @__PURE__ */ jsx16(Text_default, { size: "sm", children: subjectName ?? "Assunto n\xE3o informado" })
4041
+ /* @__PURE__ */ jsx25(Text_default, { size: "sm", children: subjectName ?? "Assunto n\xE3o informado" })
3451
4042
  ] }),
3452
- typeof position === "number" && /* @__PURE__ */ jsx16("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsxs13(Text_default, { size: "sm", className: "text-text-700", children: [
4043
+ typeof position === "number" && /* @__PURE__ */ jsx25("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsxs19(Text_default, { size: "sm", className: "text-text-700", children: [
3453
4044
  "#",
3454
4045
  position
3455
4046
  ] }) }),
3456
- /* @__PURE__ */ jsx16("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx16(Text_default, { size: "sm", className: "", children: resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o" }) })
4047
+ /* @__PURE__ */ jsx25("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx25(Text_default, { size: "sm", className: "", children: resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o" }) })
3457
4048
  ] });
3458
4049
  var ActivityCardQuestionPreview = ({
3459
4050
  subjectName = "Assunto n\xE3o informado",
@@ -3471,13 +4062,13 @@ var ActivityCardQuestionPreview = ({
3471
4062
  position
3472
4063
  }) => {
3473
4064
  const badgeColor = getSubjectColorWithOpacity(subjectColor, isDark) ?? subjectColor;
3474
- const [isExpanded, setIsExpanded] = useState7(defaultExpanded);
4065
+ const [isExpanded, setIsExpanded] = useState8(defaultExpanded);
3475
4066
  const correctOptionIds = question?.correctOptionIds || [];
3476
4067
  const resolvedQuestionTypeLabel = questionType && questionTypeLabels[questionType] ? questionTypeLabels[questionType] : questionTypeLabel || "Tipo de quest\xE3o";
3477
4068
  const safeSubjectName = subjectName ?? "Assunto n\xE3o informado";
3478
4069
  const safeIconName = iconName ?? "Book";
3479
4070
  const safeResolvedLabel = resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o";
3480
- const alternatives = useMemo(() => {
4071
+ const alternatives = useMemo2(() => {
3481
4072
  if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
3482
4073
  return [];
3483
4074
  return question.options.map((option) => {
@@ -3490,7 +4081,7 @@ var ActivityCardQuestionPreview = ({
3490
4081
  };
3491
4082
  });
3492
4083
  }, [question, questionType, correctOptionIds]);
3493
- const multipleChoices = useMemo(() => {
4084
+ const multipleChoices = useMemo2(() => {
3494
4085
  if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
3495
4086
  return [];
3496
4087
  return question.options.map((option) => {
@@ -3505,7 +4096,7 @@ var ActivityCardQuestionPreview = ({
3505
4096
  }, [question, questionType, correctOptionIds]);
3506
4097
  const renderAlternative = () => {
3507
4098
  if (alternatives.length === 0) return null;
3508
- return /* @__PURE__ */ jsx16("div", { className: "mt-4", children: /* @__PURE__ */ jsx16(
4099
+ return /* @__PURE__ */ jsx25("div", { className: "mt-4", children: /* @__PURE__ */ jsx25(
3509
4100
  AlternativesList,
3510
4101
  {
3511
4102
  alternatives,
@@ -3518,7 +4109,7 @@ var ActivityCardQuestionPreview = ({
3518
4109
  };
3519
4110
  const renderMultipleChoice = () => {
3520
4111
  if (multipleChoices.length === 0) return null;
3521
- return /* @__PURE__ */ jsx16("div", { className: "mt-4", children: /* @__PURE__ */ jsx16(
4112
+ return /* @__PURE__ */ jsx25("div", { className: "mt-4", children: /* @__PURE__ */ jsx25(
3522
4113
  MultipleChoiceList,
3523
4114
  {
3524
4115
  choices: multipleChoices,
@@ -3530,10 +4121,10 @@ var ActivityCardQuestionPreview = ({
3530
4121
  };
3531
4122
  const renderTrueOrFalse = () => {
3532
4123
  if (!question?.options || question.options.length === 0) return null;
3533
- return /* @__PURE__ */ jsx16("div", { className: "mt-4", children: /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
4124
+ return /* @__PURE__ */ jsx25("div", { className: "mt-4", children: /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
3534
4125
  const isCorrect = correctOptionIds.includes(option.id);
3535
4126
  const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
3536
- return /* @__PURE__ */ jsx16("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs13(
4127
+ return /* @__PURE__ */ jsx25("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs19(
3537
4128
  "div",
3538
4129
  {
3539
4130
  className: cn(
@@ -3541,18 +4132,18 @@ var ActivityCardQuestionPreview = ({
3541
4132
  isCorrect ? "bg-success-background border-success-300" : "bg-error-background border-error-300"
3542
4133
  ),
3543
4134
  children: [
3544
- /* @__PURE__ */ jsx16(Text_default, { size: "sm", className: "text-text-900", children: String.fromCodePoint(97 + index).concat(") ").concat(option.option) }),
3545
- /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
3546
- /* @__PURE__ */ jsxs13(Text_default, { size: "sm", className: "text-text-700", children: [
4135
+ /* @__PURE__ */ jsx25(Text_default, { size: "sm", className: "text-text-900", children: String.fromCodePoint(97 + index).concat(") ").concat(option.option) }),
4136
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
4137
+ /* @__PURE__ */ jsxs19(Text_default, { size: "sm", className: "text-text-700", children: [
3547
4138
  "Resposta correta: ",
3548
4139
  correctAnswer
3549
4140
  ] }),
3550
- /* @__PURE__ */ jsx16(
4141
+ /* @__PURE__ */ jsx25(
3551
4142
  Badge_default,
3552
4143
  {
3553
4144
  variant: "solid",
3554
4145
  action: isCorrect ? "success" : "error",
3555
- iconLeft: isCorrect ? /* @__PURE__ */ jsx16(CheckCircle4, {}) : /* @__PURE__ */ jsx16(XCircle4, {}),
4146
+ iconLeft: isCorrect ? /* @__PURE__ */ jsx25(CheckCircle6, {}) : /* @__PURE__ */ jsx25(XCircle6, {}),
3556
4147
  children: isCorrect ? "Resposta correta" : "Resposta incorreta"
3557
4148
  }
3558
4149
  )
@@ -3563,7 +4154,7 @@ var ActivityCardQuestionPreview = ({
3563
4154
  }) }) });
3564
4155
  };
3565
4156
  const renderDissertative = () => {
3566
- return /* @__PURE__ */ jsx16("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ jsx16(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
4157
+ return /* @__PURE__ */ jsx25("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ jsx25(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
3567
4158
  };
3568
4159
  const renderConnectDots = () => null;
3569
4160
  const renderFill = () => null;
@@ -3577,7 +4168,7 @@ var ActivityCardQuestionPreview = ({
3577
4168
  ["PREENCHER" /* PREENCHER */]: renderFill,
3578
4169
  ["IMAGEM" /* IMAGEM */]: renderImage
3579
4170
  };
3580
- return /* @__PURE__ */ jsxs13(
4171
+ return /* @__PURE__ */ jsxs19(
3581
4172
  "div",
3582
4173
  {
3583
4174
  className: "w-full",
@@ -3607,13 +4198,13 @@ var ActivityCardQuestionPreview = ({
3607
4198
  }
3608
4199
  },
3609
4200
  children: [
3610
- /* @__PURE__ */ jsx16(
4201
+ /* @__PURE__ */ jsx25(
3611
4202
  "div",
3612
4203
  {
3613
4204
  "data-drag-preview": "true",
3614
4205
  className: "fixed -left-[9999px] -top-[9999px] pointer-events-none z-[9999] w-[440px]",
3615
- children: /* @__PURE__ */ jsx16("div", { className: "w-full rounded-lg border border-border-200 bg-background", children: /* @__PURE__ */ jsxs13("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
3616
- /* @__PURE__ */ jsx16(
4206
+ children: /* @__PURE__ */ jsx25("div", { className: "w-full rounded-lg border border-border-200 bg-background", children: /* @__PURE__ */ jsxs19("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
4207
+ /* @__PURE__ */ jsx25(
3617
4208
  QuestionHeader,
3618
4209
  {
3619
4210
  badgeColor,
@@ -3623,7 +4214,7 @@ var ActivityCardQuestionPreview = ({
3623
4214
  position
3624
4215
  }
3625
4216
  ),
3626
- /* @__PURE__ */ jsx16(
4217
+ /* @__PURE__ */ jsx25(
3627
4218
  Text_default,
3628
4219
  {
3629
4220
  size: "md",
@@ -3635,7 +4226,7 @@ var ActivityCardQuestionPreview = ({
3635
4226
  ] }) })
3636
4227
  }
3637
4228
  ),
3638
- /* @__PURE__ */ jsxs13(
4229
+ /* @__PURE__ */ jsxs19(
3639
4230
  CardAccordation,
3640
4231
  {
3641
4232
  className: cn(
@@ -3646,8 +4237,8 @@ var ActivityCardQuestionPreview = ({
3646
4237
  onToggleExpanded: setIsExpanded,
3647
4238
  defaultExpanded,
3648
4239
  value,
3649
- trigger: /* @__PURE__ */ jsxs13("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
3650
- /* @__PURE__ */ jsx16(
4240
+ trigger: /* @__PURE__ */ jsxs19("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
4241
+ /* @__PURE__ */ jsx25(
3651
4242
  QuestionHeader,
3652
4243
  {
3653
4244
  badgeColor,
@@ -3657,7 +4248,7 @@ var ActivityCardQuestionPreview = ({
3657
4248
  position
3658
4249
  }
3659
4250
  ),
3660
- !isExpanded && /* @__PURE__ */ jsx16(
4251
+ !isExpanded && /* @__PURE__ */ jsx25(
3661
4252
  Text_default,
3662
4253
  {
3663
4254
  size: "md",
@@ -3668,7 +4259,7 @@ var ActivityCardQuestionPreview = ({
3668
4259
  )
3669
4260
  ] }),
3670
4261
  children: [
3671
- /* @__PURE__ */ jsx16(
4262
+ /* @__PURE__ */ jsx25(
3672
4263
  Text_default,
3673
4264
  {
3674
4265
  size: "md",