# -*- coding: utf-8 -*-
# hub/ticket/module_contract.py

"""Контракт каркаса Ticket для этапа 01 миграции."""

from dataclasses import dataclass


TARGET_TICKET_DIRECTORIES = (
    "application",
    "domain",
    "services",
    "state",
    "ui",
)

PUBLIC_API_SYMBOLS = (
    "TicketPlugin",
    "TicketApplicationApi",
    "TicketStateApi",
    "TicketHardwareGateway",
)

LEGACY_BEHAVIOR_SOURCES = {
    "application": (
        "presenter/task_controller.py",
        "presenter/report_controller.py",
        "presenter/specialist_controller.py",
        "presenter/archive_controller.py",
    ),
    "state": (
        "model/app_state.py",
        "model/persistence.py",
    ),
    "services": (
        "services/service_manager.py",
        "services/serial_service.py",
        "services/mock_service.py",
    ),
    "ui": (
        "view/board_module.py",
        "view/task_widget_base.py",
        "view/task_widget_details.py",
        "view/reports_view.py",
        "view/acts_view.py",
        "view/report_dialog.py",
        "view/acceptance_report_dialog.py",
    ),
}

FORBIDDEN_DIRECT_TRANSFER_FILES = (
    "client.py",
    "client.bat",
    "view/gui_main.py",
    "view/left_panel_module.py",
    "view/top_bar_module.py",
    "model/task_state_manager.py",
    "model/serial_service.py",
)


@dataclass(frozen=True, slots=True)
class TicketModuleContract:
    """Краткое описание публичных точек входа нового Ticket."""

    plugin_class_name: str = "TicketPlugin"
    plugin_display_name: str = "Ticket"
    state_api_name: str = "TicketStateApi"
    application_api_name: str = "TicketApplicationApi"
    hardware_gateway_api_name: str = "TicketHardwareGateway"


def build_ticket_module_contract() -> TicketModuleContract:
    """Вернуть краткий публичный контракт нового модуля Ticket."""
    return TicketModuleContract()
