from ..nodes.comment import Comment
from ..nodes.script import Script
from ..nodes.text import Text
from ..nodes.wrap import Wrap
from .. import Htmdoc
from ....types.he import He


class Node(He):
    def __init__(self, u: Htmdoc | Wrap) -> None: ...

    @property
    def id(self)-> int: ...

    @property
    def document(self)-> Htmdoc: ...
    def ___senior___(self, senior=None)-> bool: ...
    @property
    def senior(self)-> Wrap | None: ...
    def has_senior(self)-> bool: ...

    def output(self)-> str:...

    @staticmethod
    def is_comment()-> bool: ...
    @staticmethod
    def is_script()-> bool: ...
    @staticmethod
    def is_tag()-> bool: ...
    @staticmethod
    def is_text()-> bool: ...
    @staticmethod
    def is_wrap()-> bool: ...

    @property
    def ___anchored_to___(self)-> Node | None: ...
    def ___anchor_to___(self, node: Node): ...
    def ___is_anchored_to___(self)-> bool: ...
    @property
    def ___anchors___(self)-> dict[int, Wrap]: ...
    def ___anchor___(self, sn:int)-> Wrap: ...
    def before(self, sn:int)-> Wrap: ...
    @property
    def before1(self)-> Wrap: ...
    @property
    def before2(self)-> Wrap: ...
    @property
    def before3(self)-> Wrap: ...
    @property
    def before4(self)-> Wrap: ...
    @property
    def before5(self)-> Wrap: ...
    def after(self, sn:int)-> Wrap: ...
    @property
    def after1(self)-> Wrap: ...
    @property
    def after2(self)-> Wrap: ...
    @property
    def after3(self)-> Wrap: ...
    @property
    def after4(self)-> Wrap: ...
    @property
    def after5(self)-> Wrap: ...

    ####################################################################################################
    # Content 专用
    @property
    def ___content___(self)-> str: ...
    @___content___.setter
    def ___content___(self, content: str)-> Node: ...
    ####################################################################################################
    # Wrap 专用
    @property
    def ___juniors___(self)-> dict[int, Node]: ...

    def ___comment___(self, content: str = None)-> Comment: ...
    def ___script___(self, content: str = None)-> Script: ...
    def ___text___(self, content: str = None)-> Text: ...
    def ___wrap___(self, content=None, associated:Node=None)-> Wrap: ...

    def ___append___(self, element=None)-> Node | list[Node] | None: ...

    ####################################################################################################
    # Tag 专用
    @property
    def ___name___(self)-> str: ...
    @___name___.setter
    def ___name___(self, name: str)-> Node: ...
    @property
    def ___attributes___(self)-> dict[str, str|int|float|None]: ...

    @property
    def ___inner_anchored_to___(self)-> Node | None: ...
    def ___inner_anchor_to___(self, node: Node): ...
    def ___is_inner_anchored_to___(self)-> bool: ...
    @property
    def ___inner_anchors___(self)-> dict[int, Wrap]: ...
    def ___inner_anchor___(self, sn:int)-> Wrap: ...
    def ___inner_before___(self, sn:int)-> Wrap: ...
    @property
    def ___inner_before1___(self)-> Wrap: ...
    @property
    def ___inner_before2___(self)-> Wrap: ...
    @property
    def ___inner_before3___(self)-> Wrap: ...
    @property
    def ___inner_before4___(self)-> Wrap: ...
    @property
    def ___inner_before5___(self)-> Wrap: ...
    def ___inner_after___(self, sn:int)-> Wrap: ...
    @property
    def ___inner_after1___(self)-> Wrap: ...
    @property
    def ___inner_after2___(self)-> Wrap: ...
    @property
    def ___inner_after3___(self)-> Wrap: ...
    @property
    def ___inner_after4___(self)-> Wrap: ...
    @property
    def ___inner_after5___(self)-> Wrap: ...

    @property
    def ___output_pairable___(self)-> bool: ...
    @___output_pairable___.setter
    def ___output_pairable___(self, pairable: str)-> Node: ...
    @property
    def ___output_brealable___(self)-> bool: ...
    @___output_brealable___.setter
    def ___output_brealable___(self, pairable: str)-> Node: ...
    ####################################################################################################

    @property
    def ___level___(self)-> int: ...
    @property
    def ___output_level___(self)-> int: ...