from typing import Optional

class FormatType:
    Hwp5: int
    Hwpx: int
    Hwp3: int

class TableFallback:
    Html: int
    SimplifiedMarkdown: int
    Skip: int

class CleanupOptions:
    def __init__(
        self,
        normalize_strings: bool = True,
        clean_lines: bool = True,
        filter_structure: bool = True,
        final_normalize: bool = True,
        remove_pua: bool = True,
        remove_hwp_placeholders: bool = True,
        header_footer_threshold: float = 0.8,
        max_header_footer_length: int = 100,
        detect_mojibake: bool = True,
        preserve_frontmatter: bool = True,
    ) -> None: ...
    @staticmethod
    def minimal() -> "CleanupOptions": ...
    @staticmethod
    def aggressive() -> "CleanupOptions": ...
    @property
    def normalize_strings(self) -> bool: ...
    @normalize_strings.setter
    def normalize_strings(self, val: bool) -> None: ...
    @property
    def clean_lines(self) -> bool: ...
    @clean_lines.setter
    def clean_lines(self, val: bool) -> None: ...
    @property
    def filter_structure(self) -> bool: ...
    @filter_structure.setter
    def filter_structure(self, val: bool) -> None: ...
    @property
    def final_normalize(self) -> bool: ...
    @final_normalize.setter
    def final_normalize(self, val: bool) -> None: ...
    @property
    def remove_pua(self) -> bool: ...
    @remove_pua.setter
    def remove_pua(self, val: bool) -> None: ...
    @property
    def remove_hwp_placeholders(self) -> bool: ...
    @remove_hwp_placeholders.setter
    def remove_hwp_placeholders(self, val: bool) -> None: ...
    @property
    def header_footer_threshold(self) -> float: ...
    @header_footer_threshold.setter
    def header_footer_threshold(self, val: float) -> None: ...
    @property
    def max_header_footer_length(self) -> int: ...
    @max_header_footer_length.setter
    def max_header_footer_length(self, val: int) -> None: ...
    @property
    def detect_mojibake(self) -> bool: ...
    @detect_mojibake.setter
    def detect_mojibake(self, val: bool) -> None: ...
    @property
    def preserve_frontmatter(self) -> bool: ...
    @preserve_frontmatter.setter
    def preserve_frontmatter(self, val: bool) -> None: ...

class RenderOptions:
    def __init__(
        self,
        image_dir: Optional[str] = None,
        image_path_prefix: str = "assets/",
        table_fallback: TableFallback = TableFallback.SimplifiedMarkdown,
        max_heading_level: int = 4,
        include_frontmatter: bool = False,
        preserve_line_breaks: bool = True,
        include_empty_paragraphs: bool = False,
        list_marker: str = "-",
        use_atx_headers: bool = True,
        paragraph_spacing: bool = True,
        escape_special_chars: bool = False,
        cleanup: Optional[CleanupOptions] = None,
    ) -> None: ...
    @property
    def image_dir(self) -> Optional[str]: ...
    @image_dir.setter
    def image_dir(self, val: Optional[str]) -> None: ...
    @property
    def image_path_prefix(self) -> str: ...
    @image_path_prefix.setter
    def image_path_prefix(self, val: str) -> None: ...
    @property
    def table_fallback(self) -> TableFallback: ...
    @table_fallback.setter
    def table_fallback(self, val: TableFallback) -> None: ...
    @property
    def max_heading_level(self) -> int: ...
    @max_heading_level.setter
    def max_heading_level(self, val: int) -> None: ...
    @property
    def include_frontmatter(self) -> bool: ...
    @include_frontmatter.setter
    def include_frontmatter(self, val: bool) -> None: ...
    @property
    def preserve_line_breaks(self) -> bool: ...
    @preserve_line_breaks.setter
    def preserve_line_breaks(self, val: bool) -> None: ...
    @property
    def include_empty_paragraphs(self) -> bool: ...
    @include_empty_paragraphs.setter
    def include_empty_paragraphs(self, val: bool) -> None: ...
    @property
    def list_marker(self) -> str: ...
    @list_marker.setter
    def list_marker(self, val: str) -> None: ...
    @property
    def use_atx_headers(self) -> bool: ...
    @use_atx_headers.setter
    def use_atx_headers(self, val: bool) -> None: ...
    @property
    def paragraph_spacing(self) -> bool: ...
    @paragraph_spacing.setter
    def paragraph_spacing(self, val: bool) -> None: ...
    @property
    def escape_special_chars(self) -> bool: ...
    @escape_special_chars.setter
    def escape_special_chars(self, val: bool) -> None: ...
    @property
    def cleanup(self) -> Optional[CleanupOptions]: ...
    @cleanup.setter
    def cleanup(self, val: Optional[CleanupOptions]) -> None: ...

class Document: ...

def parse(data: bytes) -> Document: ...
def detect_format(data: bytes) -> FormatType: ...
def is_distribution(
    data: Optional[bytes] = None, document: Optional[Document] = None
) -> bool: ...
def convert_to_markdown(
    data: Optional[bytes] = None,
    document: Optional[Document] = None,
    options: Optional[RenderOptions] = None,
) -> str: ...
