"""Prefix-based HTML ID generator for card stack DOM elements."""

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

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

# %% ../../nbs/core/html_ids.ipynb #c1000003
from dataclasses import dataclass

# %% ../../nbs/core/html_ids.ipynb #c1000005
@dataclass
class CardStackHtmlIds:
    """Prefix-based HTML ID generator for card stack DOM elements."""
    prefix: str  # ID prefix for this card stack instance

    # --- Outer containers ---

    @property
    def card_stack(self) -> str:  # Full-width scroll capture container
        """Outer card stack container."""
        return f"{self.prefix}-card-stack"

    @property
    def card_stack_inner(self) -> str:  # Width-constrained CSS Grid container
        """Inner grid container for 3-section layout."""
        return f"{self.prefix}-card-stack-inner"

    @property
    def card_stack_empty(self) -> str:  # Empty state placeholder
        """Empty state container."""
        return f"{self.prefix}-card-stack-empty"

    # --- Viewport sections ---

    @property
    def viewport_section_before(self) -> str:  # Cards before focused (1fr, justify-end)
        """Viewport section for context cards before focused card."""
        return f"{self.prefix}-viewport-section-before"

    @property
    def viewport_section_focused(self) -> str:  # Focused card (auto)
        """Viewport section for the focused card."""
        return f"{self.prefix}-viewport-section-focused"

    @property
    def viewport_section_after(self) -> str:  # Cards after focused (1fr, justify-start)
        """Viewport section for context cards after focused card."""
        return f"{self.prefix}-viewport-section-after"

    # --- Dynamic slot IDs ---

    def viewport_slot(
        self,
        item_index: int  # Item index (negative or >= total for placeholders)
    ) -> str:  # Slot element ID tied to virtual item position
        """ID for a viewport slot. Works for real items and placeholders."""
        return f"{self.prefix}-item-slot-{item_index}"

    # --- Controls ---

    @property
    def card_count_select(self) -> str:  # Card count dropdown
        """Card count selector dropdown."""
        return f"{self.prefix}-card-count-select"

    @property
    def width_slider(self) -> str:  # Width range slider
        """Card stack width slider."""
        return f"{self.prefix}-width-slider"

    @property
    def scale_slider(self) -> str:  # Scale range slider
        """Card stack scale slider."""
        return f"{self.prefix}-scale-slider"

    # --- Status elements ---

    @property
    def progress(self) -> str:  # Progress indicator
        """Progress indicator element."""
        return f"{self.prefix}-progress"

    @property
    def loading(self) -> str:  # Loading state container
        """Loading state container."""
        return f"{self.prefix}-loading"

    # --- Hidden inputs ---

    @property
    def focused_index_input(self) -> str:  # Hidden input for keyboard nav focus recovery
        """Hidden input storing the focused index for HTMX submissions."""
        return f"{self.prefix}-focused-index"
