"""Constantes del dominio para la carga individual asíncrona."""

from __future__ import annotations


INGESTION_SOURCE_INDIVIDUAL = "individual"

UPLOAD_STATUS_PRECHECK_EN_COLA = "precheck_en_cola"
UPLOAD_STATUS_PRECHECK_PROCESANDO = "precheck_procesando"
UPLOAD_STATUS_ESPERANDO_CONFIRMACION = "esperando_confirmacion"
UPLOAD_STATUS_LISTO_PARA_PROCESAR = "listo_para_procesar"
UPLOAD_STATUS_PROCESANDO = "procesando"
UPLOAD_STATUS_WAITING_BASE_MATERIALIZATION = "waiting_base_materialization"
UPLOAD_STATUS_BLOCKED_BASE_FAILED = "blocked_base_failed"
UPLOAD_STATUS_COMPLETADO = "completado"
UPLOAD_STATUS_CANCELADO = "cancelado"
UPLOAD_STATUS_FALLIDO = "fallido"
UPLOAD_STATUS_ELIMINADO = "eliminado"

NON_TERMINAL_UPLOAD_STATUSES = {
    UPLOAD_STATUS_PRECHECK_EN_COLA,
    UPLOAD_STATUS_PRECHECK_PROCESANDO,
    UPLOAD_STATUS_ESPERANDO_CONFIRMACION,
    UPLOAD_STATUS_LISTO_PARA_PROCESAR,
    UPLOAD_STATUS_PROCESANDO,
    UPLOAD_STATUS_WAITING_BASE_MATERIALIZATION,
    UPLOAD_STATUS_BLOCKED_BASE_FAILED,
}

TERMINAL_UPLOAD_STATUSES = {
    UPLOAD_STATUS_COMPLETADO,
    UPLOAD_STATUS_CANCELADO,
    UPLOAD_STATUS_FALLIDO,
    UPLOAD_STATUS_ELIMINADO,
}

PENDING_ACTION_CONFIRM_CASE_IDENTITY = "confirm_case_identity"
PENDING_ACTION_CONFIRM_TYPE_OVERRIDE = "confirm_type_override"
PENDING_ACTION_CONFIRM_CASE_OVERRIDE = "confirm_case_override"

INDIVIDUAL_QUEUE_NAME = "individual_uploads"

SUPPORTED_INDIVIDUAL_SUPPORT_TYPES = {
    "factura",
    "quirurgico",
    "laboratorio",
    "radiologia",
    "generico",
}

SESSION_STATUS_ACTIVE = "active"
SESSION_STATUS_BLOCKED = "blocked"
SESSION_STATUS_COMPLETED = "completed"
SESSION_STATUS_CANCELLED = "cancelled"

ACTIVE_SESSION_STATUSES = {
    SESSION_STATUS_ACTIVE,
    SESSION_STATUS_BLOCKED,
}

TERMINAL_SESSION_STATUSES = {
    SESSION_STATUS_COMPLETED,
    SESSION_STATUS_CANCELLED,
}
