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

from typing import Generic, Self, TYPE_CHECKING, TypeVar, override
from graph_sitter.core.detached_symbols.function_call import FunctionCall
from graph_sitter.core.expressions import Expression
from graph_sitter.core.interfaces.importable import Importable
from graph_sitter.core.statements.statement import Statement
from graph_sitter.core.statements.switch_case import SwitchCase
from graph_sitter.extensions.autocommit import reader
from graph_sitter.writer_decorators import apidoc, noapidoc
from graph_sitter.core.detached_symbols.code_block import CodeBlock

if TYPE_CHECKING:
    ...
Parent = TypeVar("Parent", bound="CodeBlock")
TCodeBlock = TypeVar("TCodeBlock", bound="CodeBlock")
TSwitchCase = TypeVar("TSwitchCase", bound="SwitchCase")
@apidoc
class SwitchStatement(Statement[Parent], Generic[Parent, TCodeBlock, TSwitchCase]):
    """Abstract representation of the switch statement.

    Attributes:
        value: The value to switch on
    """
    statement_type = ...
    value: Expression[Self]
    cases: list[TSwitchCase] = ...
    @property
    @reader
    def function_calls(self) -> list[FunctionCall]:
        """Returns all function calls within the switch statement.

        Gets the function calls from the value expression and all switch cases.

        Returns:
            list[FunctionCall]: A list of all function calls found within the switch statement,
                including those in the value expression and all switch cases.
        """
        ...
    
    @property
    @noapidoc
    def descendant_symbols(self) -> list[Importable]:
        ...
    
    @property
    @reader
    @override
    def nested_code_blocks(self) -> list[TCodeBlock]:
        """Returns all nested CodeBlocks within the switch statement.

        Gets all code blocks from the switch statement's cases. Only includes code blocks
        that are not None.

        Returns:
            list[TCodeBlock]: A list of code blocks from all cases in the switch statement.
        """
        ...
    


