"""Halo PSA provider stub. Full implementation planned for Phase 5."""
from __future__ import annotations

from app.services.psa.base import PSAProvider
from app.services.psa.types import (
    ConnectionTestResult,
    PSATicket,
    PSANote,
    PSAStatus,
    PSACompany,
    PSAMember,
    PSAConfiguration,
    PSATimeEntry,
    PSABoard,
    PaginatedTicketResult,
    PSAResource,
    PSACreatedTicket,
    TicketCreatePayload,
)


class HaloPSAProvider(PSAProvider):
    """Stub provider for Halo PSA. All methods raise NotImplementedError.

    Full implementation is planned for Phase 5. This stub allows the provider
    to be registered and discovered without causing import errors.
    """

    async def test_connection(self) -> ConnectionTestResult:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def get_ticket(self, ticket_id: str) -> PSATicket:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def search_tickets(self, query: str, **filters) -> PaginatedTicketResult:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def post_note(
        self,
        ticket_id: str,
        text: str,
        note_type: str,
        member_id: str | None = None,
    ) -> PSANote:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def update_ticket_status(
        self,
        ticket_id: str,
        status_id: int,
    ) -> PSATicket:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def get_ticket_statuses(self, board_id: int) -> list[PSAStatus]:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def list_companies(self, **filters) -> list[PSACompany]:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def get_company(self, company_id: str) -> PSACompany:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def list_members(self) -> list[PSAMember]:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def list_boards(self) -> list[PSABoard]:
        raise NotImplementedError("list_boards not implemented for this provider")

    async def get_ticket_configurations(self, ticket_id: str) -> list[PSAConfiguration]:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def create_time_entry(
        self,
        ticket_id: str,
        member_id: str,
        hours: float,
        notes: str | None = None,
        work_type: str | None = None,
    ) -> PSATimeEntry:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def list_resources(self, ticket_id: int) -> list[PSAResource]:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def add_resource(self, ticket_id: int, member_id: int) -> PSAResource:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def remove_resource(self, ticket_id: int, member_id: int) -> None:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def create_ticket(self, payload: TicketCreatePayload) -> PSACreatedTicket:
        raise NotImplementedError("Halo PSA integration coming soon")

    async def list_priorities(self) -> list[dict]:
        raise NotImplementedError("Halo PSA integration coming soon")
