"""Centralized HTML ID constants for single-file transcription workflow components"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/core/html_ids.ipynb.

# %% auto 0
__all__ = ['SingleFileHtmlIds']

# %% ../../nbs/core/html_ids.ipynb 3
from cjm_fasthtml_interactions.core.html_ids import InteractionHtmlIds

# %% ../../nbs/core/html_ids.ipynb 5
class SingleFileHtmlIds(InteractionHtmlIds):
    """HTML ID constants for single-file transcription workflow."""

    # Workflow container (main wrapper for all workflow content)
    WORKFLOW_CONTAINER = "sf-workflow-container"

    # Step flow components
    STEP_CONTENT = "sf-step-content"
    STEP_PROGRESS = "sf-step-progress"

    # Plugin selection step
    PLUGIN_SELECTOR = "sf-plugin-selector"
    PLUGIN_DETAILS = "sf-plugin-details"

    # File selection step
    FILE_SELECTOR = "sf-file-selector"
    FILE_TABLE = "sf-file-table"
    FILE_SELECTION_TABLE = "sf-file-selection-table"  # Content area for paginated file selection

    # Confirmation step
    CONFIRMATION_SUMMARY = "sf-confirmation-summary"

    # Processor (in-progress view)
    PROCESSOR_CONTAINER = "sf-processor-container"
    PROCESSOR_STATUS = "sf-processor-status"
    PROCESSOR_STATUS_BADGE = "sf-processor-status-badge"
    PROCESSOR_PROGRESS = "sf-processor-progress"
    SSE_ELEMENT = "sf-sse-element"

    # Results view
    RESULTS_CONTAINER = "sf-results-container"
    RESULTS_TEXT = "sf-results-text"
    RESULTS_METADATA = "sf-results-metadata"
    RESULTS_EXPORT = "sf-results-export"

    # Buttons
    CANCEL_BTN = "sf-cancel-btn"
    NEW_TRANSCRIPTION_BTN = "sf-new-transcription-btn"
    EXPORT_TXT_BTN = "sf-export-txt-btn"
    EXPORT_SRT_BTN = "sf-export-srt-btn"
    EXPORT_VTT_BTN = "sf-export-vtt-btn"
    COPY_BTN = "sf-copy-btn"

    # Media browser IDs
    MEDIA_BROWSER_CONTAINER = "sf-media-browser"
    MEDIA_BROWSER_CONTENT = "sf-media-browser-content"
    MEDIA_PREVIEW_MODAL = "sf-media-preview"
    MEDIA_PREVIEW_WRAPPER = "sf-media-preview-wrapper"
    MEDIA_CONTROLS = "sf-media-controls"

    # Settings IDs
    SETTINGS_MODAL = "sf-settings-modal"
    SETTINGS_FORM = "sf-settings-form"
    SETTINGS_CONTAINER = "sf-settings-container"

    # Plugin configuration IDs
    PLUGIN_CONFIG_CONTAINER = "sf-plugin-config-container"
    PLUGIN_CONFIG_COLLAPSE = "sf-plugin-config-collapse"

    @staticmethod
    def plugin_radio(plugin_id: str  # Unique plugin identifier to generate ID for
                     ) -> str:  # HTML ID for the plugin radio button
        """Generate HTML ID for a plugin radio button."""
        # Sanitize plugin_id for use in HTML ID
        safe_id = plugin_id.replace(":", "-").replace("_", "-")
        return f"sf-plugin-radio-{safe_id}"

    @staticmethod
    def file_radio(index: int  # File index in the selection list
                   ) -> str:  # HTML ID for the file radio button
        """Generate HTML ID for a file radio button."""
        return f"sf-file-radio-{index}"
