# FlightMonitor/utils/gui_utils.py
"""
Utility constants and functions for GUI interactions.
This module should not import from gui or controller packages to avoid cycles.
"""

from typing import Dict  # Importa i tipi necessari

# --- GUI Status Levels ---
# Define GUI status levels used for updating the status semaphore and message.
# These constants are shared between the controller and the main window.
GUI_STATUS_OK: str = "OK"
GUI_STATUS_WARNING: str = "WARNING"
GUI_STATUS_ERROR: str = "ERROR"
GUI_STATUS_FETCHING: str = "FETCHING"
GUI_STATUS_UNKNOWN: str = "UNKNOWN"
GUI_STATUS_PERMANENT_FAILURE: str = (
    "PERMANENT_FAILURE"  # Aggiunta per completezza se usata
)

# Define default colors for GUI status levels in the semaphore.
# These should be valid Tkinter color names or hex codes.
# MainWindow userà questi colori per il suo semaforo.
SEMAPHORE_COLOR_STATUS_MAP: Dict[str, str] = {
    GUI_STATUS_OK: "green3",
    GUI_STATUS_WARNING: "gold",
    GUI_STATUS_ERROR: "red2",
    GUI_STATUS_FETCHING: "sky blue",
    GUI_STATUS_UNKNOWN: "gray70",
    GUI_STATUS_PERMANENT_FAILURE: "red4",
}

# Potresti aggiungere altre utilità GUI qui in futuro, ad esempio:
# - Funzioni per formattare dati per la visualizzazione.
# - Costanti per padding/font comuni se non già in map_constants o altrove.
