"""
Type annotations for botocore.docs.bcdoc.restdoc module.

Copyright 2025 Vlad Emelianov
"""

import re
from collections.abc import Iterable, Mapping
from logging import Logger
from typing import Any

DEFAULT_AWS_DOCS_LINK: str = ...
DOCUMENTATION_LINK_REGEX: re.Pattern[str] = ...
LARGE_SECTION_MESSAGE: str = ...
LOG: Logger = ...
SECTION_LINE_LIMIT_CONFIG: dict[str, Any] = ...
SECTION_METHOD_PATH_DEPTH: dict[str, int] = ...

class ReSTDocument:
    def __init__(self, target: str = ...) -> None: ...
    def write(self, content: str) -> None: ...
    def writeln(self, content: str) -> None: ...
    def peek_write(self) -> str: ...
    def pop_write(self) -> None: ...
    def push_write(self, s: str) -> None: ...
    def getvalue(self) -> bytes: ...
    def translate_words(self, words: Iterable[str]) -> list[str]: ...
    def handle_data(self, data: str | None) -> None: ...
    def include_doc_string(self, doc_string: str) -> None: ...
    def remove_last_doc_string(self) -> None: ...

class DocumentStructure(ReSTDocument):
    def __init__(
        self,
        name: str,
        section_names: list[str] | None = ...,
        target: str = ...,
        context: Mapping[str, Any] | None = ...,
    ) -> None: ...
    @property
    def name(self) -> str: ...
    @property
    def path(self) -> list[str]: ...
    @path.setter
    def path(self, value: list[str]) -> None: ...
    @property
    def available_sections(self) -> list[str]: ...
    @property
    def context(self) -> dict[str, Any]: ...
    def add_new_section(
        self, name: str, context: Mapping[str, Any] | None = ...
    ) -> DocumentStructure: ...
    def get_section(self, name: str) -> DocumentStructure: ...
    def has_section(self, name: str) -> bool: ...
    def delete_section(self, name: str) -> None: ...
    def flush_structure(self, docs_link: str | None = ...) -> bytes: ...
    def getvalue(self) -> bytes: ...
    def remove_all_sections(self) -> None: ...
    def clear_text(self) -> None: ...
    def add_title_section(self, title: str) -> DocumentStructure: ...
    def write_to_file(self, full_path: str, file_name: str) -> None: ...
