"""SnelStart financial reporting boundary."""

from __future__ import annotations

from app.services.snelstart.connection import integration_enabled, is_client_connected
from app.services.snelstart.models import FinancialSummary


def get_revenue(*, client_id: str, period: str) -> FinancialSummary:
    return _unavailable()


def get_costs(*, client_id: str, period: str) -> FinancialSummary:
    return _unavailable()


def get_profit(*, client_id: str, period: str) -> FinancialSummary:
    return _unavailable()


def get_monthly_summary(*, client_id: str, period: str) -> FinancialSummary:
    if not integration_enabled() or not is_client_connected(client_id):
        return FinancialSummary(
            integrationRequired=True,
            message="Financial reporting will become available once the bookkeeping integration is connected.",
        )

    # Future: aggregate figures from SnelStart for the period.
    return FinancialSummary(
        integrationRequired=True,
        message="Financial reporting will become available once the bookkeeping integration is connected.",
    )


def _unavailable() -> FinancialSummary:
    return FinancialSummary(
        integrationRequired=True,
        message="Financial reporting will become available once the bookkeeping integration is connected.",
    )
