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

from dataclasses import dataclass
from typing import TYPE_CHECKING
from graph_sitter.codebase.flagging.code_flag import CodeFlag
from graph_sitter.codebase.flagging.enums import MessageType
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.writer_decorators import noapidoc
from app.codemod.types import Group

if TYPE_CHECKING:
    ...
@dataclass
class Flags:
    _flags: list[CodeFlag] = ...
    _find_mode: bool = ...
    _active_group: list[CodeFlag] | None = ...
    def flag_instance[Symbol: Editable | None](self, symbol: Symbol = ..., message: str | None = ..., message_type: MessageType = ..., message_recipient: str | None = ...) -> CodeFlag[Symbol]:
        """Flags a symbol, file or import to enable enhanced tracking of changes and splitting into
        smaller PRs.

        This method should be called once per flaggable entity and should be called before any edits are made to the entity.
        Flags enable tracking of changes and can be used for various purposes like generating pull requests or applying changes selectively.

        Args:
            symbol (TSymbol | None): The symbol to flag. Can be None if just flagging a message.
            message (str | None): Optional message to associate with the flag.
            message_type (MessageType): The type of message. Defaults to MessageType.GITHUB and MessageType.CODEGEN.
            message_recipient (str | None): Optional recipient for the message.

        Returns:
            CodeFlag: A flag object representing the flagged entity.
        """
        ...
    
    def should_fix(self, flag: CodeFlag) -> bool:
        """Returns True if the flag should be fixed based on the current mode and active group.

        Used to filter out flags that are not in the active group and determine if the flag should be processed or ignored.

        Args:
            flag (CodeFlag): The code flag to check.

        Returns:
            bool: True if the flag should be fixed, False if it should be ignored.
            Returns False in find mode.
            Returns True if no active group is set.
            Returns True if the flag's hash exists in the active group hashes.
        """
        ...
    
    @noapidoc
    def set_find_mode(self, find_mode: bool) -> None:
        ...
    
    @noapidoc
    def set_active_group(self, group: Group) -> None:
        """Will only fix these flags."""
        ...
    


