"""
Shared Field Definitions - Single Source of Truth.

This module provides centralized field class definitions used throughout
the invoice extraction system. All field mappings are derived from
FIELD_DEFINITIONS to ensure consistency.

Usage:
    from shared.fields import FIELD_CLASSES, CLASS_NAMES, FIELD_CLASS_IDS

Available exports:
    - FieldDefinition: Dataclass for field definition
    - FIELD_DEFINITIONS: Tuple of all field definitions (immutable)
    - NUM_CLASSES: Total number of field classes (10)
    - CLASS_NAMES: List of class names in order [0..9]
    - FIELD_CLASSES: dict[int, str] - class_id to class_name
    - FIELD_CLASS_IDS: dict[str, int] - class_name to class_id
    - CLASS_TO_FIELD: dict[str, str] - class_name to field_name
    - FIELD_TO_CLASS: dict[str, str] - field_name to class_name
    - CSV_TO_CLASS_MAPPING: dict[str, int] - field_name to class_id (excludes derived)
    - TRAINING_FIELD_CLASSES: dict[str, int] - field_name to class_id (all fields)
    - ACCOUNT_FIELD_MAPPING: Mapping for supplier_accounts handling
"""

from .field_config import FieldDefinition, FIELD_DEFINITIONS, NUM_CLASSES
from .mappings import (
    CLASS_NAMES,
    FIELD_CLASSES,
    FIELD_CLASS_IDS,
    CLASS_TO_FIELD,
    FIELD_TO_CLASS,
    CSV_TO_CLASS_MAPPING,
    TRAINING_FIELD_CLASSES,
    ACCOUNT_FIELD_MAPPING,
)

__all__ = [
    "FieldDefinition",
    "FIELD_DEFINITIONS",
    "NUM_CLASSES",
    "CLASS_NAMES",
    "FIELD_CLASSES",
    "FIELD_CLASS_IDS",
    "CLASS_TO_FIELD",
    "FIELD_TO_CLASS",
    "CSV_TO_CLASS_MAPPING",
    "TRAINING_FIELD_CLASSES",
    "ACCOUNT_FIELD_MAPPING",
]
