analytica-frontend-lib 1.1.62 → 1.1.64

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.
package/dist/index.js CHANGED
@@ -88,6 +88,7 @@ __export(src_exports, {
88
88
  QUESTION_DIFFICULTY: () => QUESTION_DIFFICULTY,
89
89
  QUESTION_STATUS: () => QUESTION_STATUS,
90
90
  QUESTION_TYPE: () => QUESTION_TYPE,
91
+ QUIZ_TYPE: () => QUIZ_TYPE,
91
92
  Quiz: () => Quiz,
92
93
  QuizAlternative: () => QuizAlternative,
93
94
  QuizConnectDots: () => QuizConnectDots,
@@ -136,6 +137,7 @@ __export(src_exports, {
136
137
  Toaster: () => Toaster_default,
137
138
  VideoPlayer: () => VideoPlayer_default,
138
139
  Whiteboard: () => Whiteboard_default,
140
+ cn: () => cn,
139
141
  createNotificationStore: () => createNotificationStore,
140
142
  createNotificationsHook: () => createNotificationsHook,
141
143
  createUseNotificationStore: () => createUseNotificationStore,
@@ -8749,8 +8751,8 @@ function useApiConfig(api) {
8749
8751
  }
8750
8752
 
8751
8753
  // src/components/Quiz/Quiz.tsx
8752
- var import_phosphor_react22 = require("phosphor-react");
8753
- var import_react31 = require("react");
8754
+ var import_phosphor_react23 = require("phosphor-react");
8755
+ var import_react32 = require("react");
8754
8756
 
8755
8757
  // src/components/Quiz/useQuizStore.ts
8756
8758
  var import_zustand7 = require("zustand");
@@ -8761,6 +8763,12 @@ var QUESTION_DIFFICULTY = /* @__PURE__ */ ((QUESTION_DIFFICULTY2) => {
8761
8763
  QUESTION_DIFFICULTY2["DIFICIL"] = "DIFICIL";
8762
8764
  return QUESTION_DIFFICULTY2;
8763
8765
  })(QUESTION_DIFFICULTY || {});
8766
+ var QUIZ_TYPE = /* @__PURE__ */ ((QUIZ_TYPE2) => {
8767
+ QUIZ_TYPE2["SIMULADO"] = "SIMULADO";
8768
+ QUIZ_TYPE2["QUESTIONARIO"] = "QUESTIONARIO";
8769
+ QUIZ_TYPE2["ATIVIDADE"] = "ATIVIDADE";
8770
+ return QUIZ_TYPE2;
8771
+ })(QUIZ_TYPE || {});
8764
8772
  var QUESTION_TYPE = /* @__PURE__ */ ((QUESTION_TYPE2) => {
8765
8773
  QUESTION_TYPE2["ALTERNATIVA"] = "ALTERNATIVA";
8766
8774
  QUESTION_TYPE2["DISSERTATIVA"] = "DISSERTATIVA";
@@ -8849,6 +8857,7 @@ var useQuizStore = (0, import_zustand7.create)()(
8849
8857
  };
8850
8858
  return {
8851
8859
  // Initial State
8860
+ quiz: null,
8852
8861
  currentQuestionIndex: 0,
8853
8862
  selectedAnswers: {},
8854
8863
  userAnswers: [],
@@ -8861,9 +8870,7 @@ var useQuizStore = (0, import_zustand7.create)()(
8861
8870
  questionsResult: null,
8862
8871
  currentQuestionResult: null,
8863
8872
  // Setters
8864
- setBySimulated: (simulated) => set({ bySimulated: simulated }),
8865
- setByActivity: (activity) => set({ byActivity: activity }),
8866
- setByQuestionary: (lesson) => set({ byQuestionary: lesson }),
8873
+ setQuiz: (quiz) => set({ quiz }),
8867
8874
  setUserId: (userId) => set({ userId }),
8868
8875
  setUserAnswers: (userAnswers) => set({ userAnswers }),
8869
8876
  getUserId: () => get().userId,
@@ -8890,29 +8897,16 @@ var useQuizStore = (0, import_zustand7.create)()(
8890
8897
  set({ currentQuestionIndex: index });
8891
8898
  }
8892
8899
  },
8893
- getActiveQuiz: () => {
8894
- const { bySimulated, byActivity, byQuestionary } = get();
8895
- if (bySimulated)
8896
- return { quiz: bySimulated, type: "bySimulated" };
8897
- if (byActivity)
8898
- return { quiz: byActivity, type: "byActivity" };
8899
- if (byQuestionary)
8900
- return { quiz: byQuestionary, type: "byQuestionary" };
8901
- return null;
8902
- },
8903
8900
  selectAnswer: (questionId, answerId) => {
8904
- const { getActiveQuiz, userAnswers } = get();
8905
- const activeQuiz = getActiveQuiz();
8906
- if (!activeQuiz) return;
8907
- const activityId = activeQuiz.quiz.id;
8901
+ const { quiz, userAnswers } = get();
8902
+ if (!quiz) return;
8903
+ const activityId = quiz.id;
8908
8904
  const userId = get().getUserId();
8909
8905
  if (!userId || userId === "") {
8910
8906
  console.warn("selectAnswer called before userId is set");
8911
8907
  return;
8912
8908
  }
8913
- const question = activeQuiz.quiz.questions.find(
8914
- (q) => q.id === questionId
8915
- );
8909
+ const question = quiz.questions.find((q) => q.id === questionId);
8916
8910
  if (!question) return;
8917
8911
  const existingAnswerIndex = userAnswers.findIndex(
8918
8912
  (answer) => answer.questionId === questionId
@@ -8938,18 +8932,15 @@ var useQuizStore = (0, import_zustand7.create)()(
8938
8932
  });
8939
8933
  },
8940
8934
  selectMultipleAnswer: (questionId, answerIds) => {
8941
- const { getActiveQuiz, userAnswers } = get();
8942
- const activeQuiz = getActiveQuiz();
8943
- if (!activeQuiz) return;
8944
- const activityId = activeQuiz.quiz.id;
8935
+ const { quiz, userAnswers } = get();
8936
+ if (!quiz) return;
8937
+ const activityId = quiz.id;
8945
8938
  const userId = get().getUserId();
8946
8939
  if (!userId || userId === "") {
8947
8940
  console.warn("selectMultipleAnswer called before userId is set");
8948
8941
  return;
8949
8942
  }
8950
- const question = activeQuiz.quiz.questions.find(
8951
- (q) => q.id === questionId
8952
- );
8943
+ const question = quiz.questions.find((q) => q.id === questionId);
8953
8944
  if (!question) return;
8954
8945
  const filteredUserAnswers = userAnswers.filter(
8955
8946
  (answer) => answer.questionId !== questionId
@@ -8976,10 +8967,9 @@ var useQuizStore = (0, import_zustand7.create)()(
8976
8967
  });
8977
8968
  },
8978
8969
  selectDissertativeAnswer: (questionId, answer) => {
8979
- const { getActiveQuiz, userAnswers } = get();
8980
- const activeQuiz = getActiveQuiz();
8981
- if (!activeQuiz) return;
8982
- const activityId = activeQuiz.quiz.id;
8970
+ const { quiz, userAnswers } = get();
8971
+ if (!quiz) return;
8972
+ const activityId = quiz.id;
8983
8973
  const userId = get().getUserId();
8984
8974
  if (!userId || userId === "") {
8985
8975
  console.warn(
@@ -8987,9 +8977,7 @@ var useQuizStore = (0, import_zustand7.create)()(
8987
8977
  );
8988
8978
  return;
8989
8979
  }
8990
- const question = activeQuiz.quiz.questions.find(
8991
- (q) => q.id === questionId
8992
- );
8980
+ const question = quiz.questions.find((q) => q.id === questionId);
8993
8981
  if (!question || question.questionType !== "DISSERTATIVA" /* DISSERTATIVA */) {
8994
8982
  console.warn(
8995
8983
  "selectDissertativeAnswer called for non-dissertative question"
@@ -9020,12 +9008,11 @@ var useQuizStore = (0, import_zustand7.create)()(
9020
9008
  });
9021
9009
  },
9022
9010
  skipQuestion: () => {
9023
- const { getCurrentQuestion, userAnswers, getActiveQuiz } = get();
9011
+ const { getCurrentQuestion, userAnswers, quiz } = get();
9024
9012
  const currentQuestion = getCurrentQuestion();
9025
- const activeQuiz = getActiveQuiz();
9026
- if (!activeQuiz) return;
9013
+ if (!quiz) return;
9027
9014
  if (currentQuestion) {
9028
- const activityId = activeQuiz.quiz.id;
9015
+ const activityId = quiz.id;
9029
9016
  const userId = get().getUserId();
9030
9017
  if (!userId || userId === "") {
9031
9018
  console.warn("skipQuestion called before userId is set");
@@ -9056,18 +9043,15 @@ var useQuizStore = (0, import_zustand7.create)()(
9056
9043
  }
9057
9044
  },
9058
9045
  addUserAnswer: (questionId, answerId) => {
9059
- const { getActiveQuiz, userAnswers } = get();
9060
- const activeQuiz = getActiveQuiz();
9061
- if (!activeQuiz) return;
9062
- const activityId = activeQuiz.quiz.id;
9046
+ const { quiz, userAnswers } = get();
9047
+ if (!quiz) return;
9048
+ const activityId = quiz.id;
9063
9049
  const userId = get().getUserId();
9064
9050
  if (!userId || userId === "") {
9065
9051
  console.warn("addUserAnswer called before userId is set");
9066
9052
  return;
9067
9053
  }
9068
- const question = activeQuiz.quiz.questions.find(
9069
- (q) => q.id === questionId
9070
- );
9054
+ const question = quiz.questions.find((q) => q.id === questionId);
9071
9055
  if (!question) return;
9072
9056
  const existingAnswerIndex = userAnswers.findIndex(
9073
9057
  (answer) => answer.questionId === questionId
@@ -9103,6 +9087,7 @@ var useQuizStore = (0, import_zustand7.create)()(
9103
9087
  stopTimer();
9104
9088
  stopMinuteCallback();
9105
9089
  set({
9090
+ quiz: null,
9106
9091
  currentQuestionIndex: 0,
9107
9092
  selectedAnswers: {},
9108
9093
  userAnswers: [],
@@ -9126,17 +9111,15 @@ var useQuizStore = (0, import_zustand7.create)()(
9126
9111
  stopMinuteCallback,
9127
9112
  // Getters
9128
9113
  getCurrentQuestion: () => {
9129
- const { currentQuestionIndex, getActiveQuiz } = get();
9130
- const activeQuiz = getActiveQuiz();
9131
- if (!activeQuiz) {
9114
+ const { currentQuestionIndex, quiz } = get();
9115
+ if (!quiz) {
9132
9116
  return null;
9133
9117
  }
9134
- return activeQuiz.quiz.questions[currentQuestionIndex];
9118
+ return quiz.questions[currentQuestionIndex];
9135
9119
  },
9136
9120
  getTotalQuestions: () => {
9137
- const { getActiveQuiz } = get();
9138
- const activeQuiz = getActiveQuiz();
9139
- return activeQuiz?.quiz?.questions?.length || 0;
9121
+ const { quiz } = get();
9122
+ return quiz?.questions?.length || 0;
9140
9123
  },
9141
9124
  getAnsweredQuestions: () => {
9142
9125
  const { userAnswers } = get();
@@ -9145,11 +9128,10 @@ var useQuizStore = (0, import_zustand7.create)()(
9145
9128
  ).length;
9146
9129
  },
9147
9130
  getUnansweredQuestions: () => {
9148
- const { getActiveQuiz, userAnswers } = get();
9149
- const activeQuiz = getActiveQuiz();
9150
- if (!activeQuiz) return [];
9131
+ const { quiz, userAnswers } = get();
9132
+ if (!quiz) return [];
9151
9133
  const unansweredQuestions = [];
9152
- activeQuiz.quiz.questions.forEach((question, index) => {
9134
+ quiz.questions.forEach((question, index) => {
9153
9135
  const userAnswer = userAnswers.find(
9154
9136
  (answer) => answer.questionId === question.id
9155
9137
  );
@@ -9210,9 +9192,8 @@ var useQuizStore = (0, import_zustand7.create)()(
9210
9192
  return userAnswer;
9211
9193
  },
9212
9194
  getQuizTitle: () => {
9213
- const { getActiveQuiz } = get();
9214
- const activeQuiz = getActiveQuiz();
9215
- return activeQuiz?.quiz?.title || "Quiz";
9195
+ const { quiz } = get();
9196
+ return quiz?.title || "Quiz";
9216
9197
  },
9217
9198
  formatTime: (seconds) => {
9218
9199
  const minutes = Math.floor(seconds / 60);
@@ -9224,11 +9205,10 @@ var useQuizStore = (0, import_zustand7.create)()(
9224
9205
  return userAnswers;
9225
9206
  },
9226
9207
  getUnansweredQuestionsFromUserAnswers: () => {
9227
- const { getActiveQuiz, userAnswers } = get();
9228
- const activeQuiz = getActiveQuiz();
9229
- if (!activeQuiz) return [];
9208
+ const { quiz, userAnswers } = get();
9209
+ if (!quiz) return [];
9230
9210
  const unansweredQuestions = [];
9231
- activeQuiz.quiz.questions.forEach((question, index) => {
9211
+ quiz.questions.forEach((question, index) => {
9232
9212
  const userAnswer = userAnswers.find(
9233
9213
  (answer) => answer.questionId === question.id
9234
9214
  );
@@ -9241,8 +9221,8 @@ var useQuizStore = (0, import_zustand7.create)()(
9241
9221
  return unansweredQuestions;
9242
9222
  },
9243
9223
  getQuestionsGroupedBySubject: () => {
9244
- const { getQuestionResult, getActiveQuiz, variant } = get();
9245
- const questions = variant == "result" ? getQuestionResult()?.answers : getActiveQuiz()?.quiz.questions;
9224
+ const { getQuestionResult, quiz, variant } = get();
9225
+ const questions = variant == "result" ? getQuestionResult()?.answers : quiz?.questions;
9246
9226
  if (!questions) return {};
9247
9227
  const groupedQuestions = {};
9248
9228
  questions.forEach((question) => {
@@ -9280,19 +9260,18 @@ var useQuizStore = (0, import_zustand7.create)()(
9280
9260
  return userAnswers;
9281
9261
  },
9282
9262
  setCurrentQuestion: (question) => {
9283
- const { getActiveQuiz, variant, questionsResult } = get();
9284
- const activeQuiz = getActiveQuiz();
9285
- if (!activeQuiz) return;
9263
+ const { quiz, variant, questionsResult } = get();
9264
+ if (!quiz) return;
9286
9265
  let questionIndex = 0;
9287
9266
  if (variant == "result") {
9288
9267
  if (!questionsResult) return;
9289
9268
  const questionResult = questionsResult.answers.find((q) => q.id === question.id) ?? questionsResult.answers.find((q) => q.questionId === question.id);
9290
9269
  if (!questionResult) return;
9291
- questionIndex = activeQuiz.quiz.questions.findIndex(
9270
+ questionIndex = quiz.questions.findIndex(
9292
9271
  (q) => q.id === questionResult.questionId
9293
9272
  );
9294
9273
  } else {
9295
- questionIndex = activeQuiz.quiz.questions.findIndex(
9274
+ questionIndex = quiz.questions.findIndex(
9296
9275
  (q) => q.id === question.id
9297
9276
  );
9298
9277
  }
@@ -9326,7 +9305,7 @@ var useQuizStore = (0, import_zustand7.create)()(
9326
9305
  return userAnswer ? userAnswer.answerStatus : null;
9327
9306
  },
9328
9307
  getQuestionIndex: (questionId) => {
9329
- const { questionsResult, variant } = get();
9308
+ const { questionsResult, variant, quiz } = get();
9330
9309
  if (variant == "result") {
9331
9310
  if (!questionsResult) return 0;
9332
9311
  let idx = questionsResult.answers.findIndex(
@@ -9339,12 +9318,8 @@ var useQuizStore = (0, import_zustand7.create)()(
9339
9318
  }
9340
9319
  return idx !== -1 ? idx + 1 : 0;
9341
9320
  } else {
9342
- const { getActiveQuiz } = get();
9343
- const activeQuiz = getActiveQuiz();
9344
- if (!activeQuiz) return 0;
9345
- const idx = activeQuiz.quiz.questions.findIndex(
9346
- (q) => q.id === questionId
9347
- );
9321
+ if (!quiz) return 0;
9322
+ const idx = quiz.questions.findIndex((q) => q.id === questionId);
9348
9323
  return idx !== -1 ? idx + 1 : 0;
9349
9324
  }
9350
9325
  },
@@ -9382,10 +9357,14 @@ var useQuizStore = (0, import_zustand7.create)()(
9382
9357
  )
9383
9358
  );
9384
9359
 
9360
+ // src/components/Quiz/QuizContent.tsx
9361
+ var import_react31 = require("react");
9362
+ var import_phosphor_react22 = require("phosphor-react");
9363
+
9385
9364
  // src/assets/img/mock-image-question.png
9386
9365
  var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
9387
9366
 
9388
- // src/components/Quiz/Quiz.tsx
9367
+ // src/components/Quiz/QuizContent.tsx
9389
9368
  var import_jsx_runtime47 = require("react/jsx-runtime");
9390
9369
  var getStatusBadge = (status) => {
9391
9370
  switch (status) {
@@ -9405,158 +9384,11 @@ var getStatusStyles = (variantCorrect) => {
9405
9384
  return "bg-error-background border-error-300";
9406
9385
  }
9407
9386
  };
9408
- var Quiz = (0, import_react31.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
9409
- const { setVariant } = useQuizStore();
9410
- (0, import_react31.useEffect)(() => {
9411
- setVariant(variant);
9412
- }, [variant, setVariant]);
9413
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
9414
- });
9415
- var QuizHeaderResult = (0, import_react31.forwardRef)(
9416
- ({ className, ...props }, ref) => {
9417
- const { getQuestionResultByQuestionId, getCurrentQuestion } = useQuizStore();
9418
- const [status, setStatus] = (0, import_react31.useState)(void 0);
9419
- (0, import_react31.useEffect)(() => {
9420
- const cq = getCurrentQuestion();
9421
- if (!cq) {
9422
- setStatus(void 0);
9423
- return;
9424
- }
9425
- const qr = getQuestionResultByQuestionId(cq.id);
9426
- setStatus(qr?.answerStatus);
9427
- }, [
9428
- getCurrentQuestion,
9429
- getQuestionResultByQuestionId,
9430
- getCurrentQuestion()?.id
9431
- ]);
9432
- const getClassesByAnswersStatus = () => {
9433
- switch (status) {
9434
- case "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */:
9435
- return "bg-success-background";
9436
- case "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */:
9437
- return "bg-error-background";
9438
- default:
9439
- return "bg-error-background";
9440
- }
9441
- };
9442
- const getLabelByAnswersStatus = () => {
9443
- switch (status) {
9444
- case "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */:
9445
- return "\u{1F389} Parab\xE9ns!!";
9446
- case "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */:
9447
- return "N\xE3o foi dessa vez...";
9448
- case "NAO_RESPONDIDO" /* NAO_RESPONDIDO */:
9449
- return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
9450
- default:
9451
- return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
9452
- }
9453
- };
9454
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
9455
- "div",
9456
- {
9457
- ref,
9458
- className: cn(
9459
- "flex flex-row items-center gap-10 p-3.5 rounded-xl mb-4",
9460
- getClassesByAnswersStatus(),
9461
- className
9462
- ),
9463
- ...props,
9464
- children: [
9465
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
9466
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
9467
- ]
9468
- }
9469
- );
9470
- }
9471
- );
9472
- var QuizTitle = (0, import_react31.forwardRef)(
9473
- ({ className, ...props }, ref) => {
9474
- const {
9475
- currentQuestionIndex,
9476
- getTotalQuestions,
9477
- getQuizTitle,
9478
- timeElapsed,
9479
- formatTime: formatTime2,
9480
- isStarted
9481
- } = useQuizStore();
9482
- const [showExitConfirmation, setShowExitConfirmation] = (0, import_react31.useState)(false);
9483
- const totalQuestions = getTotalQuestions();
9484
- const quizTitle = getQuizTitle();
9485
- const handleBackClick = () => {
9486
- if (isStarted) {
9487
- setShowExitConfirmation(true);
9488
- } else {
9489
- window.history.back();
9490
- }
9491
- };
9492
- const handleConfirmExit = () => {
9493
- setShowExitConfirmation(false);
9494
- window.history.back();
9495
- };
9496
- const handleCancelExit = () => {
9497
- setShowExitConfirmation(false);
9498
- };
9499
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
9500
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
9501
- "div",
9502
- {
9503
- ref,
9504
- className: cn(
9505
- "flex flex-row justify-between items-center relative p-2",
9506
- className
9507
- ),
9508
- ...props,
9509
- children: [
9510
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9511
- IconButton_default,
9512
- {
9513
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CaretLeft, { size: 24 }),
9514
- size: "md",
9515
- "aria-label": "Voltar",
9516
- onClick: handleBackClick
9517
- }
9518
- ),
9519
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
9520
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
9521
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
9522
- ] }),
9523
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
9524
- ]
9525
- }
9526
- ),
9527
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9528
- AlertDialog,
9529
- {
9530
- isOpen: showExitConfirmation,
9531
- onChangeOpen: setShowExitConfirmation,
9532
- title: "Deseja sair?",
9533
- description: "Se voc\xEA sair do simulado agora, todas as respostas ser\xE3o perdidas.",
9534
- cancelButtonLabel: "Voltar e revisar",
9535
- submitButtonLabel: "Sair Mesmo Assim",
9536
- onSubmit: handleConfirmExit,
9537
- onCancel: handleCancelExit
9538
- }
9539
- )
9540
- ] });
9541
- }
9542
- );
9543
9387
  var QuizSubTitle = (0, import_react31.forwardRef)(
9544
9388
  ({ subTitle, ...props }, ref) => {
9545
9389
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
9546
9390
  }
9547
9391
  );
9548
- var QuizHeader = () => {
9549
- const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
9550
- const currentQuestion = getCurrentQuestion();
9551
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9552
- HeaderAlternative,
9553
- {
9554
- title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
9555
- subTitle: currentQuestion?.knowledgeMatrix?.[0]?.topic?.name ?? "",
9556
- content: currentQuestion?.statement ?? ""
9557
- }
9558
- );
9559
- };
9560
9392
  var QuizContainer = (0, import_react31.forwardRef)(({ children, className, ...props }, ref) => {
9561
9393
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9562
9394
  "div",
@@ -9571,21 +9403,6 @@ var QuizContainer = (0, import_react31.forwardRef)(({ children, className, ...pr
9571
9403
  }
9572
9404
  );
9573
9405
  });
9574
- var QuizContent = (0, import_react31.forwardRef)(({ paddingBottom }) => {
9575
- const { getCurrentQuestion } = useQuizStore();
9576
- const currentQuestion = getCurrentQuestion();
9577
- const questionComponents = {
9578
- ["ALTERNATIVA" /* ALTERNATIVA */]: QuizAlternative,
9579
- ["MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */]: QuizMultipleChoice,
9580
- ["DISSERTATIVA" /* DISSERTATIVA */]: QuizDissertative,
9581
- ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: QuizTrueOrFalse,
9582
- ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: QuizConnectDots,
9583
- ["PREENCHER" /* PREENCHER */]: QuizFill,
9584
- ["IMAGEM" /* IMAGEM */]: QuizImageQuestion
9585
- };
9586
- const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
9587
- return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuestionComponent, { paddingBottom }) : null;
9588
- });
9589
9406
  var QuizAlternative = ({ paddingBottom }) => {
9590
9407
  const {
9591
9408
  getCurrentQuestion,
@@ -9789,7 +9606,7 @@ var QuizDissertative = ({ paddingBottom }) => {
9789
9606
  ) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
9790
9607
  variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
9791
9608
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
9792
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." }) })
9609
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentQuestionResult?.teacherFeedback }) })
9793
9610
  ] })
9794
9611
  ] });
9795
9612
  };
@@ -10290,6 +10107,153 @@ var QuizImageQuestion = ({ paddingBottom }) => {
10290
10107
  ) })
10291
10108
  ] });
10292
10109
  };
10110
+
10111
+ // src/components/Quiz/Quiz.tsx
10112
+ var import_jsx_runtime48 = require("react/jsx-runtime");
10113
+ var getQuizTypeConfig = (type) => {
10114
+ const QUIZ_TYPE_CONFIG = {
10115
+ ["SIMULADO" /* SIMULADO */]: {
10116
+ label: "Simulado",
10117
+ article: "o",
10118
+ preposition: "do"
10119
+ },
10120
+ ["QUESTIONARIO" /* QUESTIONARIO */]: {
10121
+ label: "Question\xE1rio",
10122
+ article: "o",
10123
+ preposition: "do"
10124
+ },
10125
+ ["ATIVIDADE" /* ATIVIDADE */]: {
10126
+ label: "Atividade",
10127
+ article: "a",
10128
+ preposition: "da"
10129
+ }
10130
+ };
10131
+ const config = QUIZ_TYPE_CONFIG[type];
10132
+ return config || QUIZ_TYPE_CONFIG["SIMULADO" /* SIMULADO */];
10133
+ };
10134
+ var getTypeLabel = (type) => {
10135
+ return getQuizTypeConfig(type).label;
10136
+ };
10137
+ var getCompletionTitle = (type) => {
10138
+ const config = getQuizTypeConfig(type);
10139
+ return `Voc\xEA concluiu ${config.article} ${config.label.toLowerCase()}!`;
10140
+ };
10141
+ var getExitConfirmationText = (type) => {
10142
+ const config = getQuizTypeConfig(type);
10143
+ return `Se voc\xEA sair ${config.preposition} ${config.label.toLowerCase()} agora, todas as respostas ser\xE3o perdidas.`;
10144
+ };
10145
+ var getFinishConfirmationText = (type) => {
10146
+ const config = getQuizTypeConfig(type);
10147
+ return `Tem certeza que deseja finalizar ${config.article} ${config.label.toLowerCase()}?`;
10148
+ };
10149
+ var Quiz = (0, import_react32.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
10150
+ const { setVariant } = useQuizStore();
10151
+ (0, import_react32.useEffect)(() => {
10152
+ setVariant(variant);
10153
+ }, [variant, setVariant]);
10154
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
10155
+ });
10156
+ var QuizTitle = (0, import_react32.forwardRef)(
10157
+ ({ className, ...props }, ref) => {
10158
+ const {
10159
+ quiz,
10160
+ currentQuestionIndex,
10161
+ getTotalQuestions,
10162
+ getQuizTitle,
10163
+ timeElapsed,
10164
+ formatTime: formatTime2,
10165
+ isStarted
10166
+ } = useQuizStore();
10167
+ const [showExitConfirmation, setShowExitConfirmation] = (0, import_react32.useState)(false);
10168
+ const totalQuestions = getTotalQuestions();
10169
+ const quizTitle = getQuizTitle();
10170
+ const handleBackClick = () => {
10171
+ if (isStarted) {
10172
+ setShowExitConfirmation(true);
10173
+ } else {
10174
+ window.history.back();
10175
+ }
10176
+ };
10177
+ const handleConfirmExit = () => {
10178
+ setShowExitConfirmation(false);
10179
+ window.history.back();
10180
+ };
10181
+ const handleCancelExit = () => {
10182
+ setShowExitConfirmation(false);
10183
+ };
10184
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
10185
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
10186
+ "div",
10187
+ {
10188
+ ref,
10189
+ className: cn(
10190
+ "flex flex-row justify-between items-center relative p-2",
10191
+ className
10192
+ ),
10193
+ ...props,
10194
+ children: [
10195
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10196
+ IconButton_default,
10197
+ {
10198
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react23.CaretLeft, { size: 24 }),
10199
+ size: "md",
10200
+ "aria-label": "Voltar",
10201
+ onClick: handleBackClick
10202
+ }
10203
+ ),
10204
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
10205
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
10206
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
10207
+ ] }),
10208
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react23.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
10209
+ ]
10210
+ }
10211
+ ),
10212
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10213
+ AlertDialog,
10214
+ {
10215
+ isOpen: showExitConfirmation,
10216
+ onChangeOpen: setShowExitConfirmation,
10217
+ title: "Deseja sair?",
10218
+ description: getExitConfirmationText(
10219
+ quiz?.type || "SIMULADO" /* SIMULADO */
10220
+ ),
10221
+ cancelButtonLabel: "Voltar e revisar",
10222
+ submitButtonLabel: "Sair Mesmo Assim",
10223
+ onSubmit: handleConfirmExit,
10224
+ onCancel: handleCancelExit
10225
+ }
10226
+ )
10227
+ ] });
10228
+ }
10229
+ );
10230
+ var QuizHeader = () => {
10231
+ const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
10232
+ const currentQuestion = getCurrentQuestion();
10233
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10234
+ HeaderAlternative,
10235
+ {
10236
+ title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
10237
+ subTitle: currentQuestion?.knowledgeMatrix?.[0]?.topic?.name ?? "",
10238
+ content: currentQuestion?.statement ?? ""
10239
+ }
10240
+ );
10241
+ };
10242
+ var QuizContent = (0, import_react32.forwardRef)(({ paddingBottom }) => {
10243
+ const { getCurrentQuestion } = useQuizStore();
10244
+ const currentQuestion = getCurrentQuestion();
10245
+ const questionComponents = {
10246
+ ["ALTERNATIVA" /* ALTERNATIVA */]: QuizAlternative,
10247
+ ["MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */]: QuizMultipleChoice,
10248
+ ["DISSERTATIVA" /* DISSERTATIVA */]: QuizDissertative,
10249
+ ["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: QuizTrueOrFalse,
10250
+ ["LIGAR_PONTOS" /* LIGAR_PONTOS */]: QuizConnectDots,
10251
+ ["PREENCHER" /* PREENCHER */]: QuizFill,
10252
+ ["IMAGEM" /* IMAGEM */]: QuizImageQuestion
10253
+ };
10254
+ const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
10255
+ return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(QuestionComponent, { paddingBottom }) : null;
10256
+ });
10293
10257
  var QuizQuestionList = ({
10294
10258
  filterType = "all",
10295
10259
  onQuestionClick
@@ -10335,18 +10299,18 @@ var QuizQuestionList = ({
10335
10299
  return "Em branco";
10336
10300
  }
10337
10301
  };
10338
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
10339
- Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
10302
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
10303
+ Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
10340
10304
  Object.entries(filteredGroupedQuestions).map(
10341
- ([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "flex flex-col gap-2", children: [
10342
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
10343
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.BookOpen, { size: 17, className: "text-white" }) }),
10344
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
10305
+ ([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: "flex flex-col gap-2", children: [
10306
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
10307
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react23.BookOpen, { size: 17, className: "text-white" }) }),
10308
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
10345
10309
  ] }),
10346
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
10310
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
10347
10311
  const status = getQuestionStatus(question.id);
10348
10312
  const questionNumber = getQuestionIndex(question.id);
10349
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10313
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10350
10314
  CardStatus,
10351
10315
  {
10352
10316
  header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
@@ -10363,16 +10327,21 @@ var QuizQuestionList = ({
10363
10327
  )
10364
10328
  ] });
10365
10329
  };
10366
- var QuizFooter = (0, import_react31.forwardRef)(
10330
+ var QuizFooter = (0, import_react32.forwardRef)(
10367
10331
  ({
10368
10332
  className,
10369
10333
  onGoToSimulated,
10370
10334
  onDetailResult,
10371
10335
  handleFinishSimulated,
10336
+ onGoToNextModule,
10337
+ onRepeat,
10338
+ onTryLater,
10372
10339
  resultImageComponent,
10340
+ resultIncorrectImageComponent,
10373
10341
  ...props
10374
10342
  }, ref) => {
10375
10343
  const {
10344
+ quiz,
10376
10345
  currentQuestionIndex,
10377
10346
  getTotalQuestions,
10378
10347
  goToNextQuestion,
@@ -10391,23 +10360,36 @@ var QuizFooter = (0, import_react31.forwardRef)(
10391
10360
  const currentAnswer = getCurrentAnswer();
10392
10361
  const currentQuestion = getCurrentQuestion();
10393
10362
  const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
10394
- const [alertDialogOpen, setAlertDialogOpen] = (0, import_react31.useState)(false);
10395
- const [modalResultOpen, setModalResultOpen] = (0, import_react31.useState)(false);
10396
- const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react31.useState)(false);
10397
- const [modalResolutionOpen, setModalResolutionOpen] = (0, import_react31.useState)(false);
10398
- const [filterType, setFilterType] = (0, import_react31.useState)("all");
10363
+ const [activeModal, setActiveModal] = (0, import_react32.useState)(null);
10364
+ const [filterType, setFilterType] = (0, import_react32.useState)("all");
10365
+ const openModal = (modalName) => setActiveModal(modalName);
10366
+ const closeModal = () => setActiveModal(null);
10367
+ const isModalOpen = (modalName) => activeModal === modalName;
10399
10368
  const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
10400
10369
  const allQuestions = getTotalQuestions();
10370
+ const stats = getQuestionResultStatistics();
10371
+ const correctAnswers = stats?.correctAnswers;
10372
+ const totalAnswers = stats?.totalAnswered;
10373
+ const quizType = quiz?.type || "SIMULADO" /* SIMULADO */;
10374
+ const quizTypeLabel = getTypeLabel(quizType);
10401
10375
  const handleFinishQuiz = async () => {
10402
10376
  if (unansweredQuestions.length > 0) {
10403
- setAlertDialogOpen(true);
10377
+ openModal("alertDialog");
10404
10378
  return;
10405
10379
  }
10406
10380
  try {
10407
10381
  if (handleFinishSimulated) {
10408
10382
  await Promise.resolve(handleFinishSimulated());
10409
10383
  }
10410
- setModalResultOpen(true);
10384
+ if (quizType === "QUESTIONARIO" /* QUESTIONARIO */ && typeof correctAnswers === "number" && typeof totalAnswers === "number" && correctAnswers === totalAnswers) {
10385
+ openModal("modalQuestionnaireAllCorrect");
10386
+ return;
10387
+ }
10388
+ if (quizType === "QUESTIONARIO" /* QUESTIONARIO */ && typeof correctAnswers === "number" && correctAnswers === 0) {
10389
+ openModal("modalQuestionnaireAllIncorrect");
10390
+ return;
10391
+ }
10392
+ openModal("modalResult");
10411
10393
  } catch (err) {
10412
10394
  console.error("handleFinishSimulated failed:", err);
10413
10395
  return;
@@ -10418,16 +10400,23 @@ var QuizFooter = (0, import_react31.forwardRef)(
10418
10400
  if (handleFinishSimulated) {
10419
10401
  await Promise.resolve(handleFinishSimulated());
10420
10402
  }
10421
- setModalResultOpen(true);
10422
- setAlertDialogOpen(false);
10403
+ if (quizType === "QUESTIONARIO" /* QUESTIONARIO */ && typeof correctAnswers === "number" && typeof totalAnswers === "number" && correctAnswers === totalAnswers) {
10404
+ openModal("modalQuestionnaireAllCorrect");
10405
+ return;
10406
+ }
10407
+ if (quizType === "QUESTIONARIO" /* QUESTIONARIO */ && typeof correctAnswers === "number" && correctAnswers === 0) {
10408
+ openModal("modalQuestionnaireAllIncorrect");
10409
+ return;
10410
+ }
10411
+ openModal("modalResult");
10423
10412
  } catch (err) {
10424
10413
  console.error("handleFinishSimulated failed:", err);
10425
- setAlertDialogOpen(false);
10414
+ closeModal();
10426
10415
  return;
10427
10416
  }
10428
10417
  };
10429
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
10430
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10418
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
10419
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10431
10420
  "footer",
10432
10421
  {
10433
10422
  ref,
@@ -10436,17 +10425,17 @@ var QuizFooter = (0, import_react31.forwardRef)(
10436
10425
  className
10437
10426
  ),
10438
10427
  ...props,
10439
- children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
10440
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
10441
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10428
+ children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
10429
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
10430
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10442
10431
  IconButton_default,
10443
10432
  {
10444
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.SquaresFour, { size: 24, className: "text-text-950" }),
10433
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react23.SquaresFour, { size: 24, className: "text-text-950" }),
10445
10434
  size: "md",
10446
- onClick: () => setModalNavigateOpen(true)
10435
+ onClick: () => openModal("modalNavigate")
10447
10436
  }
10448
10437
  ),
10449
- isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10438
+ isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10450
10439
  Button_default,
10451
10440
  {
10452
10441
  variant: "outline",
@@ -10457,13 +10446,13 @@ var QuizFooter = (0, import_react31.forwardRef)(
10457
10446
  },
10458
10447
  children: "Pular"
10459
10448
  }
10460
- ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10449
+ ) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10461
10450
  Button_default,
10462
10451
  {
10463
10452
  size: "medium",
10464
10453
  variant: "link",
10465
10454
  action: "primary",
10466
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CaretLeft, { size: 18 }),
10455
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react23.CaretLeft, { size: 18 }),
10467
10456
  onClick: () => {
10468
10457
  goToPreviousQuestion();
10469
10458
  },
@@ -10471,7 +10460,7 @@ var QuizFooter = (0, import_react31.forwardRef)(
10471
10460
  }
10472
10461
  )
10473
10462
  ] }),
10474
- !isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10463
+ !isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10475
10464
  Button_default,
10476
10465
  {
10477
10466
  size: "small",
@@ -10484,7 +10473,7 @@ var QuizFooter = (0, import_react31.forwardRef)(
10484
10473
  children: "Pular"
10485
10474
  }
10486
10475
  ),
10487
- isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10476
+ isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10488
10477
  Button_default,
10489
10478
  {
10490
10479
  size: "medium",
@@ -10494,13 +10483,13 @@ var QuizFooter = (0, import_react31.forwardRef)(
10494
10483
  onClick: handleFinishQuiz,
10495
10484
  children: "Finalizar"
10496
10485
  }
10497
- ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10486
+ ) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10498
10487
  Button_default,
10499
10488
  {
10500
10489
  size: "medium",
10501
10490
  variant: "link",
10502
10491
  action: "primary",
10503
- iconRight: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.CaretRight, { size: 18 }),
10492
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react23.CaretRight, { size: 18 }),
10504
10493
  disabled: !currentAnswer && !isCurrentQuestionSkipped,
10505
10494
  onClick: () => {
10506
10495
  goToNextQuestion();
@@ -10508,157 +10497,313 @@ var QuizFooter = (0, import_react31.forwardRef)(
10508
10497
  children: "Avan\xE7ar"
10509
10498
  }
10510
10499
  )
10511
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10500
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10512
10501
  Button_default,
10513
10502
  {
10514
10503
  variant: "solid",
10515
10504
  action: "primary",
10516
10505
  size: "medium",
10517
- onClick: () => setModalResolutionOpen(true),
10506
+ onClick: () => openModal("modalResolution"),
10518
10507
  children: "Ver Resolu\xE7\xE3o"
10519
10508
  }
10520
10509
  ) })
10521
10510
  }
10522
10511
  ),
10523
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10512
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10524
10513
  AlertDialog,
10525
10514
  {
10526
- isOpen: alertDialogOpen,
10527
- onChangeOpen: setAlertDialogOpen,
10528
- title: "Finalizar simulado?",
10529
- description: unansweredQuestions.length > 0 ? `Voc\xEA deixou as quest\xF5es ${unansweredQuestions.join(", ")} sem resposta. Finalizar agora pode impactar seu desempenho.` : "Tem certeza que deseja finalizar o simulado?",
10515
+ isOpen: isModalOpen("alertDialog"),
10516
+ onChangeOpen: (open) => open ? openModal("alertDialog") : closeModal(),
10517
+ title: `Finalizar ${quizTypeLabel.toLowerCase()}?`,
10518
+ description: unansweredQuestions.length > 0 ? `Voc\xEA deixou as quest\xF5es ${unansweredQuestions.join(", ")} sem resposta. Finalizar agora pode impactar seu desempenho.` : getFinishConfirmationText(quizType),
10530
10519
  cancelButtonLabel: "Voltar e revisar",
10531
10520
  submitButtonLabel: "Finalizar Mesmo Assim",
10532
10521
  onSubmit: handleAlertSubmit
10533
10522
  }
10534
10523
  ),
10535
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10524
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10536
10525
  Modal_default,
10537
10526
  {
10538
- isOpen: modalResultOpen,
10539
- onClose: () => setModalResultOpen(false),
10527
+ isOpen: isModalOpen("modalResult"),
10528
+ onClose: closeModal,
10540
10529
  title: "",
10541
10530
  closeOnEscape: false,
10542
10531
  hideCloseButton: true,
10543
10532
  size: "md",
10544
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
10545
- resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
10546
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
10547
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
10548
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: "text-text-500 font-sm", children: [
10549
- "Voc\xEA acertou",
10550
- " ",
10551
- getQuestionResultStatistics()?.correctAnswers ?? "--",
10552
- " de",
10553
- " ",
10533
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
10534
+ resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
10535
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
10536
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
10537
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: "text-text-500 font-sm", children: [
10538
+ "Voc\xEA acertou ",
10539
+ correctAnswers ?? "--",
10540
+ " de ",
10554
10541
  allQuestions,
10555
- " quest\xF5es."
10542
+ " ",
10543
+ "quest\xF5es."
10556
10544
  ] })
10557
10545
  ] }),
10558
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
10559
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10546
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
10547
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
10560
10548
  Button_default,
10561
10549
  {
10562
10550
  variant: "outline",
10563
10551
  className: "w-full",
10564
10552
  size: "small",
10565
10553
  onClick: onGoToSimulated,
10566
- children: "Ir para simulados"
10554
+ children: [
10555
+ "Ir para ",
10556
+ quizTypeLabel.toLocaleLowerCase(),
10557
+ "s"
10558
+ ]
10567
10559
  }
10568
10560
  ),
10569
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
10561
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
10570
10562
  ] })
10571
10563
  ] })
10572
10564
  }
10573
10565
  ),
10574
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10566
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10575
10567
  Modal_default,
10576
10568
  {
10577
- isOpen: modalNavigateOpen,
10578
- onClose: () => setModalNavigateOpen(false),
10569
+ isOpen: isModalOpen("modalNavigate"),
10570
+ onClose: closeModal,
10579
10571
  title: "Quest\xF5es",
10580
10572
  size: "lg",
10581
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
10582
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
10583
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
10584
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
10585
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10573
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
10574
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
10575
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
10576
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
10577
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10586
10578
  SelectTrigger,
10587
10579
  {
10588
10580
  variant: "rounded",
10589
10581
  className: "max-w-[266px] min-w-[160px]",
10590
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
10582
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
10591
10583
  }
10592
10584
  ),
10593
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(SelectContent, { children: [
10594
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "all", children: "Todas" }),
10595
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
10596
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
10585
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(SelectContent, { children: [
10586
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem, { value: "all", children: "Todas" }),
10587
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
10588
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
10597
10589
  ] })
10598
10590
  ] }) })
10599
10591
  ] }),
10600
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10592
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10601
10593
  QuizQuestionList,
10602
10594
  {
10603
10595
  filterType,
10604
- onQuestionClick: () => setModalNavigateOpen(false)
10596
+ onQuestionClick: closeModal
10605
10597
  }
10606
10598
  ) })
10607
10599
  ] })
10608
10600
  }
10609
10601
  ),
10610
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10602
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10611
10603
  Modal_default,
10612
10604
  {
10613
- isOpen: modalResolutionOpen,
10614
- onClose: () => setModalResolutionOpen(false),
10605
+ isOpen: isModalOpen("modalResolution"),
10606
+ onClose: closeModal,
10615
10607
  title: "Resolu\xE7\xE3o",
10616
10608
  size: "lg",
10617
10609
  children: currentQuestion?.solutionExplanation
10618
10610
  }
10611
+ ),
10612
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10613
+ Modal_default,
10614
+ {
10615
+ isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
10616
+ onClose: closeModal,
10617
+ title: "",
10618
+ closeOnEscape: false,
10619
+ hideCloseButton: true,
10620
+ size: "md",
10621
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
10622
+ resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
10623
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
10624
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
10625
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
10626
+ ] }),
10627
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button_default, { className: "w-full", onClick: onGoToNextModule, children: "Pr\xF3ximo m\xF3dulo" }) })
10628
+ ] })
10629
+ }
10630
+ ),
10631
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10632
+ Modal_default,
10633
+ {
10634
+ isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
10635
+ onClose: closeModal,
10636
+ title: "",
10637
+ closeOnEscape: false,
10638
+ hideCloseButton: true,
10639
+ size: "md",
10640
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
10641
+ resultIncorrectImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-[282px] h-auto", children: resultIncorrectImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
10642
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
10643
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
10644
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA tirou 0 no question\xE1rio, mas n\xE3o se preocupe! Isso \xE9 apenas uma oportunidade de aprendizado." }),
10645
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-500 font-sm", children: "Que tal tentar novamente para melhorar sua nota? Estamos aqui para te ajudar a entender o conte\xFAdo e evoluir." }),
10646
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-text-500 font-sm", children: "Clique em Repetir Question\xE1rio e mostre do que voc\xEA \xE9 capaz! \u{1F4AA}" })
10647
+ ] }),
10648
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
10649
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10650
+ Button_default,
10651
+ {
10652
+ type: "button",
10653
+ variant: "link",
10654
+ size: "small",
10655
+ className: "w-auto",
10656
+ onClick: () => {
10657
+ closeModal();
10658
+ openModal("alertDialogTryLater");
10659
+ },
10660
+ children: "Tentar depois"
10661
+ }
10662
+ ),
10663
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10664
+ Button_default,
10665
+ {
10666
+ variant: "outline",
10667
+ size: "small",
10668
+ className: "w-auto",
10669
+ onClick: onDetailResult,
10670
+ children: "Detalhar resultado"
10671
+ }
10672
+ ),
10673
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10674
+ Button_default,
10675
+ {
10676
+ className: "w-auto",
10677
+ size: "small",
10678
+ onClick: onGoToNextModule,
10679
+ children: "Pr\xF3ximo m\xF3dulo"
10680
+ }
10681
+ )
10682
+ ] })
10683
+ ] })
10684
+ }
10685
+ ),
10686
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
10687
+ AlertDialog,
10688
+ {
10689
+ isOpen: isModalOpen("alertDialogTryLater"),
10690
+ onChangeOpen: (open) => open ? openModal("alertDialogTryLater") : closeModal(),
10691
+ title: "Tentar depois?",
10692
+ description: "Voc\xEA optou por refazer o question\xE1rio mais tarde.\n\nLembre-se: enquanto n\xE3o refazer o question\xE1rio, sua nota permanecer\xE1 0 no sistema.",
10693
+ cancelButtonLabel: "Repetir question\xE1rio",
10694
+ submitButtonLabel: "Tentar depois",
10695
+ onSubmit: () => {
10696
+ onTryLater?.();
10697
+ closeModal();
10698
+ },
10699
+ onCancel: () => {
10700
+ onRepeat?.();
10701
+ closeModal();
10702
+ }
10703
+ }
10619
10704
  )
10620
10705
  ] });
10621
10706
  }
10622
10707
  );
10708
+
10709
+ // src/components/Quiz/QuizResult.tsx
10710
+ var import_react33 = require("react");
10711
+ var import_phosphor_react24 = require("phosphor-react");
10712
+ var import_jsx_runtime49 = require("react/jsx-runtime");
10623
10713
  var QuizBadge = ({
10624
10714
  subtype
10625
10715
  }) => {
10626
10716
  switch (subtype) {
10627
10717
  case "PROVA" /* PROVA */:
10628
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
10718
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
10629
10719
  case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
10630
10720
  case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
10631
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
10721
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
10632
10722
  case "VESTIBULAR" /* VESTIBULAR */:
10633
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
10723
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
10634
10724
  case "SIMULADO" /* SIMULADO */:
10635
10725
  case "SIMULADAO" /* SIMULADAO */:
10636
10726
  case void 0:
10637
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
10727
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
10638
10728
  default:
10639
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
10729
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
10640
10730
  }
10641
10731
  };
10642
- var QuizResultHeaderTitle = (0, import_react31.forwardRef)(({ className, ...props }, ref) => {
10643
- const { getActiveQuiz } = useQuizStore();
10644
- const activeQuiz = getActiveQuiz();
10645
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
10732
+ var QuizHeaderResult = (0, import_react33.forwardRef)(
10733
+ ({ className, ...props }, ref) => {
10734
+ const { getQuestionResultByQuestionId, getCurrentQuestion } = useQuizStore();
10735
+ const [status, setStatus] = (0, import_react33.useState)(void 0);
10736
+ (0, import_react33.useEffect)(() => {
10737
+ const cq = getCurrentQuestion();
10738
+ if (!cq) {
10739
+ setStatus(void 0);
10740
+ return;
10741
+ }
10742
+ const qr = getQuestionResultByQuestionId(cq.id);
10743
+ setStatus(qr?.answerStatus);
10744
+ }, [
10745
+ getCurrentQuestion,
10746
+ getQuestionResultByQuestionId,
10747
+ getCurrentQuestion()?.id
10748
+ ]);
10749
+ const getClassesByAnswersStatus = () => {
10750
+ switch (status) {
10751
+ case "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */:
10752
+ return "bg-success-background";
10753
+ case "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */:
10754
+ return "bg-error-background";
10755
+ default:
10756
+ return "bg-error-background";
10757
+ }
10758
+ };
10759
+ const getLabelByAnswersStatus = () => {
10760
+ switch (status) {
10761
+ case "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */:
10762
+ return "\u{1F389} Parab\xE9ns!!";
10763
+ case "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */:
10764
+ return "N\xE3o foi dessa vez...";
10765
+ case "NAO_RESPONDIDO" /* NAO_RESPONDIDO */:
10766
+ default:
10767
+ return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
10768
+ }
10769
+ };
10770
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
10771
+ "div",
10772
+ {
10773
+ ref,
10774
+ className: cn(
10775
+ "flex flex-row items-center gap-10 p-3.5 rounded-xl mb-4",
10776
+ getClassesByAnswersStatus(),
10777
+ className
10778
+ ),
10779
+ ...props,
10780
+ children: [
10781
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
10782
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
10783
+ ]
10784
+ }
10785
+ );
10786
+ }
10787
+ );
10788
+ var QuizResultHeaderTitle = (0, import_react33.forwardRef)(({ className, ...props }, ref) => {
10789
+ const { quiz } = useQuizStore();
10790
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
10646
10791
  "div",
10647
10792
  {
10648
10793
  ref,
10649
10794
  className: cn("flex flex-row pt-4 justify-between", className),
10650
10795
  ...props,
10651
10796
  children: [
10652
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
10653
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(QuizBadge, { subtype: activeQuiz?.quiz.subtype || void 0 })
10797
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
10798
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
10654
10799
  ]
10655
10800
  }
10656
10801
  );
10657
10802
  });
10658
- var QuizResultTitle = (0, import_react31.forwardRef)(({ className, ...props }, ref) => {
10803
+ var QuizResultTitle = (0, import_react33.forwardRef)(({ className, ...props }, ref) => {
10659
10804
  const { getQuizTitle } = useQuizStore();
10660
10805
  const quizTitle = getQuizTitle();
10661
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10806
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10662
10807
  "p",
10663
10808
  {
10664
10809
  className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
@@ -10668,7 +10813,7 @@ var QuizResultTitle = (0, import_react31.forwardRef)(({ className, ...props }, r
10668
10813
  }
10669
10814
  );
10670
10815
  });
10671
- var QuizResultPerformance = (0, import_react31.forwardRef)(
10816
+ var QuizResultPerformance = (0, import_react33.forwardRef)(
10672
10817
  ({ ...props }, ref) => {
10673
10818
  const {
10674
10819
  getTotalQuestions,
@@ -10710,15 +10855,15 @@ var QuizResultPerformance = (0, import_react31.forwardRef)(
10710
10855
  });
10711
10856
  }
10712
10857
  const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
10713
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
10858
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
10714
10859
  "div",
10715
10860
  {
10716
10861
  className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
10717
10862
  ref,
10718
10863
  ...props,
10719
10864
  children: [
10720
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative", children: [
10721
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10865
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative", children: [
10866
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10722
10867
  ProgressCircle_default,
10723
10868
  {
10724
10869
  size: "medium",
@@ -10728,24 +10873,24 @@ var QuizResultPerformance = (0, import_react31.forwardRef)(
10728
10873
  label: ""
10729
10874
  }
10730
10875
  ),
10731
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
10732
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
10733
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react22.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
10734
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
10876
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
10877
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
10878
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react24.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
10879
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
10735
10880
  (getQuestionResultStatistics()?.timeSpent ?? 0) * 60
10736
10881
  ) })
10737
10882
  ] }),
10738
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
10883
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
10739
10884
  getQuestionResultStatistics()?.correctAnswers ?? "--",
10740
10885
  " de",
10741
10886
  " ",
10742
10887
  totalQuestions
10743
10888
  ] }),
10744
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
10889
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
10745
10890
  ] })
10746
10891
  ] }),
10747
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
10748
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10892
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
10893
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10749
10894
  ProgressBar_default,
10750
10895
  {
10751
10896
  className: "w-full",
@@ -10759,7 +10904,7 @@ var QuizResultPerformance = (0, import_react31.forwardRef)(
10759
10904
  percentageClassName: "text-xs font-medium leading-[14px] text-right"
10760
10905
  }
10761
10906
  ),
10762
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10907
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10763
10908
  ProgressBar_default,
10764
10909
  {
10765
10910
  className: "w-full",
@@ -10773,7 +10918,7 @@ var QuizResultPerformance = (0, import_react31.forwardRef)(
10773
10918
  percentageClassName: "text-xs font-medium leading-[14px] text-right"
10774
10919
  }
10775
10920
  ),
10776
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10921
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10777
10922
  ProgressBar_default,
10778
10923
  {
10779
10924
  className: "w-full",
@@ -10793,7 +10938,7 @@ var QuizResultPerformance = (0, import_react31.forwardRef)(
10793
10938
  );
10794
10939
  }
10795
10940
  );
10796
- var QuizListResult = (0, import_react31.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
10941
+ var QuizListResult = (0, import_react33.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
10797
10942
  const { getQuestionsGroupedBySubject } = useQuizStore();
10798
10943
  const groupedQuestions = getQuestionsGroupedBySubject();
10799
10944
  const subjectsStats = Object.entries(groupedQuestions).map(
@@ -10820,9 +10965,9 @@ var QuizListResult = (0, import_react31.forwardRef)(({ className, onSubjectClick
10820
10965
  };
10821
10966
  }
10822
10967
  );
10823
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { ref, className, ...props, children: [
10824
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
10825
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10968
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { ref, className, ...props, children: [
10969
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
10970
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10826
10971
  CardResults,
10827
10972
  {
10828
10973
  onClick: () => onSubjectClick?.(subject.subject.id),
@@ -10844,16 +10989,16 @@ var QuizListResultByMateria = ({
10844
10989
  const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
10845
10990
  const groupedQuestions = getQuestionsGroupedBySubject();
10846
10991
  const answeredQuestions = groupedQuestions[subject] || [];
10847
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col", children: [
10848
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
10849
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "flex flex-col ", children: [
10850
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
10851
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
10992
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
10993
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
10994
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { className: "flex flex-col ", children: [
10995
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
10996
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
10852
10997
  const questionIndex = getQuestionIndex(
10853
10998
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10854
10999
  question.questionId ?? question.id
10855
11000
  );
10856
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11001
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
10857
11002
  CardStatus,
10858
11003
  {
10859
11004
  className: "max-w-full",
@@ -10876,12 +11021,12 @@ var QuizListResultByMateria = ({
10876
11021
  };
10877
11022
 
10878
11023
  // src/components/LoadingModal/loadingModal.tsx
10879
- var import_react32 = require("react");
10880
- var import_jsx_runtime48 = require("react/jsx-runtime");
10881
- var LoadingModal = (0, import_react32.forwardRef)(
11024
+ var import_react34 = require("react");
11025
+ var import_jsx_runtime50 = require("react/jsx-runtime");
11026
+ var LoadingModal = (0, import_react34.forwardRef)(
10882
11027
  ({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
10883
11028
  if (!open) return null;
10884
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11029
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10885
11030
  "div",
10886
11031
  {
10887
11032
  ref,
@@ -10890,8 +11035,8 @@ var LoadingModal = (0, import_react32.forwardRef)(
10890
11035
  "aria-describedby": "loading-modal-subtitle",
10891
11036
  className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
10892
11037
  ...props,
10893
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
10894
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
11038
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
11039
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
10895
11040
  "svg",
10896
11041
  {
10897
11042
  width: "102",
@@ -10902,14 +11047,14 @@ var LoadingModal = (0, import_react32.forwardRef)(
10902
11047
  "aria-hidden": "true",
10903
11048
  focusable: false,
10904
11049
  children: [
10905
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11050
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10906
11051
  "path",
10907
11052
  {
10908
11053
  d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
10909
11054
  className: "fill-primary-100"
10910
11055
  }
10911
11056
  ),
10912
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11057
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10913
11058
  "path",
10914
11059
  {
10915
11060
  d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
@@ -10919,9 +11064,9 @@ var LoadingModal = (0, import_react32.forwardRef)(
10919
11064
  ]
10920
11065
  }
10921
11066
  ) }),
10922
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
10923
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
10924
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
11067
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
11068
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
11069
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
10925
11070
  ] })
10926
11071
  ] })
10927
11072
  }
@@ -10931,8 +11076,8 @@ var LoadingModal = (0, import_react32.forwardRef)(
10931
11076
  var loadingModal_default = LoadingModal;
10932
11077
 
10933
11078
  // src/components/NotificationCard/NotificationCard.tsx
10934
- var import_phosphor_react23 = require("phosphor-react");
10935
- var import_react33 = require("react");
11079
+ var import_phosphor_react25 = require("phosphor-react");
11080
+ var import_react35 = require("react");
10936
11081
 
10937
11082
  // src/store/notificationStore.ts
10938
11083
  var import_zustand8 = require("zustand");
@@ -11179,14 +11324,14 @@ var createNotificationStore = (apiClient) => {
11179
11324
  var mock_content_default = "./mock-content-K2CDVG6P.png";
11180
11325
 
11181
11326
  // src/components/NotificationCard/NotificationCard.tsx
11182
- var import_jsx_runtime49 = require("react/jsx-runtime");
11327
+ var import_jsx_runtime51 = require("react/jsx-runtime");
11183
11328
  var NotificationEmpty = ({
11184
11329
  emptyStateImage,
11185
11330
  emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
11186
11331
  emptyStateDescription = "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!"
11187
11332
  }) => {
11188
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
11189
- emptyStateImage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11333
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
11334
+ emptyStateImage && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11190
11335
  "img",
11191
11336
  {
11192
11337
  src: emptyStateImage,
@@ -11196,23 +11341,23 @@ var NotificationEmpty = ({
11196
11341
  className: "object-contain"
11197
11342
  }
11198
11343
  ) }),
11199
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
11200
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
11344
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
11345
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
11201
11346
  ] });
11202
11347
  };
11203
11348
  var NotificationHeader = ({
11204
11349
  unreadCount,
11205
11350
  variant = "modal"
11206
11351
  }) => {
11207
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
11208
- variant === "modal" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
11209
- unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11352
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
11353
+ variant === "modal" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
11354
+ unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11210
11355
  Badge_default,
11211
11356
  {
11212
11357
  variant: "solid",
11213
11358
  action: "info",
11214
11359
  size: "small",
11215
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.Bell, { size: 12, "aria-hidden": "true", focusable: "false" }),
11360
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.Bell, { size: 12, "aria-hidden": "true", focusable: "false" }),
11216
11361
  className: "border-0",
11217
11362
  children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
11218
11363
  }
@@ -11248,7 +11393,7 @@ var SingleNotificationCard = ({
11248
11393
  onNavigate();
11249
11394
  }
11250
11395
  };
11251
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11396
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
11252
11397
  "div",
11253
11398
  {
11254
11399
  className: cn(
@@ -11257,20 +11402,20 @@ var SingleNotificationCard = ({
11257
11402
  className
11258
11403
  ),
11259
11404
  children: [
11260
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
11261
- !isRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
11262
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
11263
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu_default, { children: [
11264
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11405
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
11406
+ !isRead && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
11407
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
11408
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu_default, { children: [
11409
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11265
11410
  DropdownMenuTrigger,
11266
11411
  {
11267
11412
  className: "flex-shrink-0 inline-flex items-center justify-center font-medium bg-transparent text-text-950 cursor-pointer hover:bg-info-50 w-6 h-6 rounded-lg",
11268
11413
  "aria-label": "Menu de a\xE7\xF5es",
11269
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.DotsThreeVertical, { size: 24 })
11414
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.DotsThreeVertical, { size: 24 })
11270
11415
  }
11271
11416
  ),
11272
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
11273
- !isRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11417
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
11418
+ !isRead && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11274
11419
  DropdownMenuItem,
11275
11420
  {
11276
11421
  onClick: handleMarkAsRead,
@@ -11278,14 +11423,14 @@ var SingleNotificationCard = ({
11278
11423
  children: "Marcar como lida"
11279
11424
  }
11280
11425
  ),
11281
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
11426
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
11282
11427
  ] })
11283
11428
  ] })
11284
11429
  ] }),
11285
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
11286
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
11287
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-medium text-text-400", children: time }),
11288
- onNavigate && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11430
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
11431
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
11432
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-sm font-medium text-text-400", children: time }),
11433
+ onNavigate && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11289
11434
  "button",
11290
11435
  {
11291
11436
  type: "button",
@@ -11313,7 +11458,7 @@ var NotificationList = ({
11313
11458
  className,
11314
11459
  emptyStateImage
11315
11460
  }) => {
11316
- const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react33.useState)({ isOpen: false, notification: null });
11461
+ const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react35.useState)({ isOpen: false, notification: null });
11317
11462
  const handleGlobalNotificationClick = (notification) => {
11318
11463
  if (onGlobalNotificationClick) {
11319
11464
  onGlobalNotificationClick(notification);
@@ -11325,9 +11470,9 @@ var NotificationList = ({
11325
11470
  }
11326
11471
  };
11327
11472
  if (error) {
11328
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
11329
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-error-600", children: error }),
11330
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11473
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
11474
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm text-error-600", children: error }),
11475
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11331
11476
  "button",
11332
11477
  {
11333
11478
  type: "button",
@@ -11339,8 +11484,8 @@ var NotificationList = ({
11339
11484
  ] });
11340
11485
  }
11341
11486
  if (loading) {
11342
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
11343
- (skeletonId) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11487
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
11488
+ (skeletonId) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11344
11489
  SkeletonCard,
11345
11490
  {
11346
11491
  className: "p-4 border-b border-border-200"
@@ -11350,11 +11495,11 @@ var NotificationList = ({
11350
11495
  ) });
11351
11496
  }
11352
11497
  if (!groupedNotifications || groupedNotifications.length === 0) {
11353
- return renderEmpty ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationEmpty, {});
11498
+ return renderEmpty ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationEmpty, {});
11354
11499
  }
11355
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("flex flex-col gap-0 w-full", className), children: [
11356
- groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
11357
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
11500
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex flex-col gap-0 w-full", className), children: [
11501
+ groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col", children: [
11502
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
11358
11503
  group.notifications.map((notification) => {
11359
11504
  const isGlobalNotification = !notification.entityType && !notification.entityId && !notification.activity && !notification.goal;
11360
11505
  let navigationHandler;
@@ -11374,7 +11519,7 @@ var NotificationList = ({
11374
11519
  notification.entityType ?? void 0
11375
11520
  );
11376
11521
  }
11377
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11522
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11378
11523
  SingleNotificationCard,
11379
11524
  {
11380
11525
  title: notification.title,
@@ -11390,7 +11535,7 @@ var NotificationList = ({
11390
11535
  );
11391
11536
  })
11392
11537
  ] }, `${group.label}-${idx}`)),
11393
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11538
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11394
11539
  Modal_default,
11395
11540
  {
11396
11541
  isOpen: globalNotificationModal.isOpen,
@@ -11427,8 +11572,8 @@ var NotificationCenter = ({
11427
11572
  className
11428
11573
  }) => {
11429
11574
  const { isMobile } = useMobile();
11430
- const [isModalOpen, setIsModalOpen] = (0, import_react33.useState)(false);
11431
- const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react33.useState)({ isOpen: false, notification: null });
11575
+ const [isModalOpen, setIsModalOpen] = (0, import_react35.useState)(false);
11576
+ const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react35.useState)({ isOpen: false, notification: null });
11432
11577
  const handleMobileClick = () => {
11433
11578
  setIsModalOpen(true);
11434
11579
  onFetchNotifications?.();
@@ -11443,12 +11588,12 @@ var NotificationCenter = ({
11443
11588
  onToggleActive?.();
11444
11589
  }
11445
11590
  };
11446
- (0, import_react33.useEffect)(() => {
11591
+ (0, import_react35.useEffect)(() => {
11447
11592
  if (isActive) {
11448
11593
  onFetchNotifications?.();
11449
11594
  }
11450
11595
  }, [isActive, onFetchNotifications]);
11451
- const renderEmptyState = () => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11596
+ const renderEmptyState = () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11452
11597
  NotificationEmpty,
11453
11598
  {
11454
11599
  emptyStateImage,
@@ -11457,17 +11602,17 @@ var NotificationCenter = ({
11457
11602
  }
11458
11603
  );
11459
11604
  if (isMobile) {
11460
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
11461
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11605
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11606
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11462
11607
  IconButton_default,
11463
11608
  {
11464
11609
  active: isModalOpen,
11465
11610
  onClick: handleMobileClick,
11466
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.Bell, { size: 24, className: "text-primary" }),
11611
+ icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.Bell, { size: 24, className: "text-primary" }),
11467
11612
  className
11468
11613
  }
11469
11614
  ),
11470
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11615
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11471
11616
  Modal_default,
11472
11617
  {
11473
11618
  isOpen: isModalOpen,
@@ -11476,10 +11621,10 @@ var NotificationCenter = ({
11476
11621
  size: "md",
11477
11622
  hideCloseButton: false,
11478
11623
  closeOnEscape: true,
11479
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
11480
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-0 pb-3 border-b border-border-200", children: [
11481
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationHeader, { unreadCount, variant: "modal" }),
11482
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11624
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
11625
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "px-0 pb-3 border-b border-border-200", children: [
11626
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationHeader, { unreadCount, variant: "modal" }),
11627
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11483
11628
  "button",
11484
11629
  {
11485
11630
  type: "button",
@@ -11489,7 +11634,7 @@ var NotificationCenter = ({
11489
11634
  }
11490
11635
  )
11491
11636
  ] }),
11492
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11637
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11493
11638
  NotificationList,
11494
11639
  {
11495
11640
  groupedNotifications,
@@ -11519,19 +11664,19 @@ var NotificationCenter = ({
11519
11664
  )
11520
11665
  ] });
11521
11666
  }
11522
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
11523
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11667
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11668
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
11524
11669
  DropdownMenu_default,
11525
11670
  {
11526
11671
  ...typeof isActive === "boolean" ? { open: isActive, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange },
11527
11672
  children: [
11528
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11673
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11529
11674
  IconButton_default,
11530
11675
  {
11531
11676
  active: isActive,
11532
11677
  onClick: handleDesktopClick,
11533
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11534
- import_phosphor_react23.Bell,
11678
+ icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11679
+ import_phosphor_react25.Bell,
11535
11680
  {
11536
11681
  size: 24,
11537
11682
  className: isActive ? "text-primary-950" : "text-primary"
@@ -11540,22 +11685,22 @@ var NotificationCenter = ({
11540
11685
  className
11541
11686
  }
11542
11687
  ) }),
11543
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11688
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11544
11689
  DropdownMenuContent,
11545
11690
  {
11546
11691
  className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
11547
11692
  side: "bottom",
11548
11693
  align: "end",
11549
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
11550
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
11551
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11694
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col", children: [
11695
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
11696
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11552
11697
  NotificationHeader,
11553
11698
  {
11554
11699
  unreadCount,
11555
11700
  variant: "dropdown"
11556
11701
  }
11557
11702
  ),
11558
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11703
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11559
11704
  "button",
11560
11705
  {
11561
11706
  type: "button",
@@ -11565,7 +11710,7 @@ var NotificationCenter = ({
11565
11710
  }
11566
11711
  )
11567
11712
  ] }),
11568
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11713
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11569
11714
  NotificationList,
11570
11715
  {
11571
11716
  groupedNotifications,
@@ -11592,7 +11737,7 @@ var NotificationCenter = ({
11592
11737
  ]
11593
11738
  }
11594
11739
  ),
11595
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11740
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11596
11741
  Modal_default,
11597
11742
  {
11598
11743
  isOpen: globalNotificationModal.isOpen,
@@ -11611,7 +11756,7 @@ var NotificationCenter = ({
11611
11756
  var NotificationCard = (props) => {
11612
11757
  switch (props.mode) {
11613
11758
  case "single":
11614
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11759
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11615
11760
  SingleNotificationCard,
11616
11761
  {
11617
11762
  title: props.title,
@@ -11626,7 +11771,7 @@ var NotificationCard = (props) => {
11626
11771
  }
11627
11772
  );
11628
11773
  case "list":
11629
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11774
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11630
11775
  NotificationList,
11631
11776
  {
11632
11777
  groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
@@ -11649,9 +11794,9 @@ var NotificationCard = (props) => {
11649
11794
  }
11650
11795
  );
11651
11796
  case "center":
11652
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationCenter, { ...props });
11797
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationCenter, { ...props });
11653
11798
  default:
11654
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
11799
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
11655
11800
  }
11656
11801
  };
11657
11802
  var NotificationCard_default = NotificationCard;
@@ -11662,7 +11807,7 @@ var createUseNotificationStore = (apiClient) => {
11662
11807
  };
11663
11808
 
11664
11809
  // src/hooks/useNotifications.ts
11665
- var import_react34 = require("react");
11810
+ var import_react36 = require("react");
11666
11811
  var createUseNotifications = (apiClient) => {
11667
11812
  const useNotificationStore = createUseNotificationStore(apiClient);
11668
11813
  return () => {
@@ -11681,7 +11826,7 @@ var createUseNotifications = (apiClient) => {
11681
11826
  resetError,
11682
11827
  getGroupedNotifications
11683
11828
  } = useNotificationStore();
11684
- const handleNavigate = (0, import_react34.useCallback)(
11829
+ const handleNavigate = (0, import_react36.useCallback)(
11685
11830
  (entityType, entityId, onAfterNavigate) => {
11686
11831
  if (entityType && entityId) {
11687
11832
  switch (entityType.toUpperCase()) {
@@ -11699,7 +11844,7 @@ var createUseNotifications = (apiClient) => {
11699
11844
  },
11700
11845
  []
11701
11846
  );
11702
- const getActionLabel = (0, import_react34.useCallback)(
11847
+ const getActionLabel = (0, import_react36.useCallback)(
11703
11848
  (entityType) => {
11704
11849
  if (!entityType) return "Ver mais";
11705
11850
  switch (entityType.toUpperCase()) {
@@ -11713,7 +11858,7 @@ var createUseNotifications = (apiClient) => {
11713
11858
  },
11714
11859
  []
11715
11860
  );
11716
- const markAsReadAndNavigate = (0, import_react34.useCallback)(
11861
+ const markAsReadAndNavigate = (0, import_react36.useCallback)(
11717
11862
  async (id, entityType, entityId, onAfterNavigate) => {
11718
11863
  await markAsRead(id);
11719
11864
  if (entityType && entityId) {
@@ -11722,11 +11867,11 @@ var createUseNotifications = (apiClient) => {
11722
11867
  },
11723
11868
  [markAsRead, handleNavigate]
11724
11869
  );
11725
- const refreshNotifications = (0, import_react34.useCallback)(async () => {
11870
+ const refreshNotifications = (0, import_react36.useCallback)(async () => {
11726
11871
  resetError();
11727
11872
  await fetchNotifications();
11728
11873
  }, [resetError, fetchNotifications]);
11729
- const formatNotification = (0, import_react34.useCallback)(
11874
+ const formatNotification = (0, import_react36.useCallback)(
11730
11875
  (notification) => ({
11731
11876
  ...notification,
11732
11877
  time: formatTimeAgo(notification.createdAt),
@@ -11735,7 +11880,7 @@ var createUseNotifications = (apiClient) => {
11735
11880
  }),
11736
11881
  []
11737
11882
  );
11738
- const getFormattedGroupedNotifications = (0, import_react34.useCallback)(() => {
11883
+ const getFormattedGroupedNotifications = (0, import_react36.useCallback)(() => {
11739
11884
  const groups = getGroupedNotifications();
11740
11885
  return groups.map((group) => ({
11741
11886
  ...group,
@@ -11831,6 +11976,7 @@ var createNotificationsHook = (apiClient) => {
11831
11976
  QUESTION_DIFFICULTY,
11832
11977
  QUESTION_STATUS,
11833
11978
  QUESTION_TYPE,
11979
+ QUIZ_TYPE,
11834
11980
  Quiz,
11835
11981
  QuizAlternative,
11836
11982
  QuizConnectDots,
@@ -11879,6 +12025,7 @@ var createNotificationsHook = (apiClient) => {
11879
12025
  Toaster,
11880
12026
  VideoPlayer,
11881
12027
  Whiteboard,
12028
+ cn,
11882
12029
  createNotificationStore,
11883
12030
  createNotificationsHook,
11884
12031
  createUseNotificationStore,