// src/types/common.ts
var GenericApiStatus = /* @__PURE__ */ ((GenericApiStatus2) => {
  GenericApiStatus2["A_VENCER"] = "A_VENCER";
  GenericApiStatus2["VENCIDA"] = "VENCIDA";
  GenericApiStatus2["CONCLUIDA"] = "CONCLUIDA";
  return GenericApiStatus2;
})(GenericApiStatus || {});
var GenericDisplayStatus = /* @__PURE__ */ ((GenericDisplayStatus3) => {
  GenericDisplayStatus3["ATIVA"] = "ATIVA";
  GenericDisplayStatus3["VENCIDA"] = "VENCIDA";
  GenericDisplayStatus3["CONCLUIDA"] = "CONCLU\xCDDA";
  return GenericDisplayStatus3;
})(GenericDisplayStatus || {});
var BadgeActionType = /* @__PURE__ */ ((BadgeActionType3) => {
  BadgeActionType3["SUCCESS"] = "success";
  BadgeActionType3["WARNING"] = "warning";
  BadgeActionType3["ERROR"] = "error";
  BadgeActionType3["INFO"] = "info";
  return BadgeActionType3;
})(BadgeActionType || {});
var getStatusBadgeAction = (status) => {
  const actionMap = {
    ["CONCLU\xCDDA" /* CONCLUIDA */]: "success" /* SUCCESS */,
    ["ATIVA" /* ATIVA */]: "warning" /* WARNING */,
    ["VENCIDA" /* VENCIDA */]: "error" /* ERROR */
  };
  return actionMap[status] ?? "warning" /* WARNING */;
};

// src/types/recommendedLessons.ts
var getRecommendedClassStatusBadgeAction = (status) => getStatusBadgeAction(status);
var RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS = [
  { id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
  { id: "A_VENCER" /* A_VENCER */, name: "Ativa" }
];
var RECOMMENDED_CLASS_STATUS_OPTIONS = [
  { id: "A_VENCER" /* A_VENCER */, name: "A Vencer" },
  { id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
  { id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
];
var StudentLessonStatus = /* @__PURE__ */ ((StudentLessonStatus2) => {
  StudentLessonStatus2["A_INICIAR"] = "A INICIAR";
  StudentLessonStatus2["EM_ANDAMENTO"] = "EM ANDAMENTO";
  StudentLessonStatus2["NAO_FINALIZADO"] = "N\xC3O FINALIZADO";
  StudentLessonStatus2["CONCLUIDO"] = "CONCLU\xCDDO";
  return StudentLessonStatus2;
})(StudentLessonStatus || {});
var getStudentStatusBadgeAction = (status) => {
  const actionMap = {
    ["CONCLU\xCDDO" /* CONCLUIDO */]: "success",
    ["EM ANDAMENTO" /* EM_ANDAMENTO */]: "info",
    ["A INICIAR" /* A_INICIAR */]: "warning",
    ["N\xC3O FINALIZADO" /* NAO_FINALIZADO */]: "error"
  };
  return actionMap[status] ?? "warning";
};
var isDeadlinePassed = (deadline) => {
  if (!deadline) return false;
  return new Date(deadline) < /* @__PURE__ */ new Date();
};
var deriveStudentStatus = (progress, completedAt, deadline) => {
  if (completedAt) return "CONCLU\xCDDO" /* CONCLUIDO */;
  if (progress === 100) return "CONCLU\xCDDO" /* CONCLUIDO */;
  if (isDeadlinePassed(deadline ?? null) && progress < 100) {
    return "N\xC3O FINALIZADO" /* NAO_FINALIZADO */;
  }
  if (progress === 0) return "A INICIAR" /* A_INICIAR */;
  if (progress > 0) return "EM ANDAMENTO" /* EM_ANDAMENTO */;
  return "A INICIAR" /* A_INICIAR */;
};
var formatDaysToComplete = (daysToComplete) => {
  if (daysToComplete === null) return null;
  if (daysToComplete === 1) return "1 dia";
  return `${daysToComplete} dias`;
};
var RECOMMENDED_CLASS_ACTIVITY_STATUS = {
  PENDENTE: "PENDENTE",
  CONCLUIDA: "CONCLUIDA",
  EXPIRADA: "EXPIRADA",
  AGUARDANDO_CORRECAO: "AGUARDANDO_CORRECAO",
  AGUARDANDO_RESPOSTA: "AGUARDANDO_RESPOSTA"
};
var RecommendedClassDraftType = /* @__PURE__ */ ((RecommendedClassDraftType2) => {
  RecommendedClassDraftType2["MODELO"] = "MODELO";
  RecommendedClassDraftType2["RASCUNHO"] = "RASCUNHO";
  return RecommendedClassDraftType2;
})(RecommendedClassDraftType || {});
export {
  RECOMMENDED_CLASS_ACTIVITY_STATUS,
  RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS,
  RECOMMENDED_CLASS_STATUS_OPTIONS,
  GenericApiStatus as RecommendedClassApiStatus,
  BadgeActionType as RecommendedClassBadgeActionType,
  GenericDisplayStatus as RecommendedClassDisplayStatus,
  RecommendedClassDraftType,
  StudentLessonStatus,
  deriveStudentStatus,
  formatDaysToComplete,
  getRecommendedClassStatusBadgeAction,
  getStudentStatusBadgeAction,
  isDeadlinePassed
};
//# sourceMappingURL=index.mjs.map