from __future__ import annotations

import enum

class RowDisplay(enum.Enum):
    """Row selection strategy used by qroissant repr formatting."""

    HEAD = ...
    HEAD_TAIL = ...


class FormattingOptions:
    """Formatting options for user-facing qroissant string representations.

    Notes
    -----
    These options control how qroissant values render through :func:`str` and
    :func:`repr`. Apply them process-wide through
    :func:`qroissant.set_formatting_options`.
    """

    @staticmethod
    def builder() -> FormattingOptionsBuilder:
        """Create a builder initialized with qroissant's default formatting policy."""
        ...
    @property
    def max_rows(self) -> int:
        """Maximum number of rows displayed in table repr."""
        ...
    @property
    def max_columns(self) -> int:
        """Maximum number of columns displayed in table repr."""
        ...
    @property
    def row_display(self) -> RowDisplay:
        """Row selection strategy used when the row limit is exceeded."""
        ...


class FormattingOptionsBuilder:
    """Builder for :class:`FormattingOptions`."""

    def with_max_rows(self, value: int, /) -> FormattingOptionsBuilder:
        """Set the maximum number of rows displayed in table repr."""
        ...
    def with_max_columns(self, value: int, /) -> FormattingOptionsBuilder:
        """Set the maximum number of columns displayed in table repr."""
        ...
    def with_row_display(self, value: RowDisplay, /) -> FormattingOptionsBuilder:
        """Set the row selection strategy used when the row limit is exceeded."""
        ...
    def build(self) -> FormattingOptions:
        """Finalize the builder into immutable repr formatting options."""
        ...


def get_formatting_options() -> FormattingOptions:
    """Get the current process-wide formatting options."""
    ...

def set_formatting_options(options: FormattingOptions, /) -> None:
    """Set the process-wide formatting options."""
    ...

def reset_formatting_options() -> None:
    """Reset the formatting options to their default values."""
    ...
