"""AWOOOI warning-step dashboard source."""

from __future__ import annotations

from typing import Any

from src.services.awoooi_onboarding_source_contracts import source_ready_payload

_SCHEMA_VERSION = "awoooi_gitea_onboarding_warning_step_dashboard_v1"


def load_latest_awoooi_gitea_onboarding_warning_step_dashboard() -> dict[str, Any]:
    """Return the dashboard model for warning-step controlled copy gates."""
    return source_ready_payload(
        schema_version=_SCHEMA_VERSION,
        source_id="warning_step_dashboard_service",
        status="dashboard_source_ready_controlled_apply_gate_open",
        readback={
            "dashboard_status": "ready_controlled_template_copy_apply_gate_open",
            "gate_count": 4,
            "blocked_gate_count": 0,
            "controlled_apply_gate_open_count": 1,
            "cards": [
                "owner_package",
                "owner_response_preflight",
                "template_copy_execution_plan",
                "template_copy_apply_gate",
            ],
        },
        next_actions=[
            "show_controlled_apply_gate_open_state",
            "copy_warning_step_template_only_after_runner_pressure_guard",
        ],
    )
