"""
This type stub file was generated by pyright.
"""

from typing import Final, NamedTuple
from streamlit import env_util

"""Manage the user's Streamlit credentials."""
_LOGGER: Final = ...
if env_util.IS_WINDOWS:
    _CONFIG_FILE_PATH = ...
else:
    _CONFIG_FILE_PATH = ...
class _Activation(NamedTuple):
    email: str | None
    is_valid: bool
    ...


def email_prompt() -> str:
    ...

_TELEMETRY_HEADLESS_TEXT = ...
class Credentials:
    """Credentials class."""
    _singleton: Credentials | None = ...
    @classmethod
    def get_current(cls): # -> Credentials | None:
        """Return the singleton instance."""
        ...
    
    def __init__(self) -> None:
        """Initialize class."""
        ...
    
    def __repr__(self) -> str:
        ...
    
    def load(self, auto_resolve: bool = ...) -> None:
        """Load from toml file."""
        ...
    
    @classmethod
    def reset(cls) -> None:
        """Reset credentials by removing file.

        This is used by `streamlit activate reset` in case a user wants
        to start over.
        """
        ...
    
    def save(self) -> None:
        """Save to toml file and send email."""
        ...
    
    def activate(self, show_instructions: bool = ...) -> None:
        """Activate Streamlit.

        Used by `streamlit activate`.
        """
        ...
    


def check_credentials() -> None:
    """Check credentials and potentially activate.

    Note
    ----
    If there is no credential file and we are in headless mode, we should not
    check, since credential would be automatically set to an empty string.

    """
    ...

