"""Export protocols defining contracts for transcript exporters.

Define Protocol interfaces for exporting meeting transcripts to various formats.
"""

from __future__ import annotations

from typing import TYPE_CHECKING, Protocol

if TYPE_CHECKING:
    from collections.abc import Sequence

    from noteflow.domain.entities.meeting import Meeting
    from noteflow.domain.entities.segment import Segment


class TranscriptExporter(Protocol):
    """Protocol for exporting meeting transcripts to file formats.

    Implementations should produce formatted output for the target format
    (e.g., Markdown, HTML) from meeting data.
    """

    def export(
        self,
        meeting: Meeting,
        segments: Sequence[Segment],
    ) -> str | bytes:
        """Export meeting transcript to formatted output.

        Args:
            meeting: Meeting entity with metadata.
            segments: Ordered list of transcript segments.

        Returns:
            Formatted transcript as string (text formats) or bytes (binary formats like PDF).
        """
        ...

    @property
    def format_name(self) -> str:
        """Human-readable format name (e.g., 'Markdown', 'HTML')."""
        ...

    @property
    def file_extension(self) -> str:
        """File extension for this format (e.g., '.md', '.html')."""
        ...
