# mypy: disable-error-code="misc, override, attr-defined, no-redef, assignment"

import UI4.Widgets.SceneGraphView.Filtering
import UI4.Widgets.SceneGraphView.SceneGraphHandle
import UI4.Widgets.SceneGraphView.SceneGraphViewColumn
import Utils as Utils
import typing
from UI4.Widgets.SceneGraphView.Filtering.Criteria import Criteria as Criteria
from UI4.Widgets.SceneGraphView.Filtering.Evaluator import GetEvaluatorInstance as GetEvaluatorInstance, GetRegisteredEvaluators as GetRegisteredEvaluators
from UI4.Widgets.SceneGraphView.Filtering.Rule import Rule as Rule
from UI4.Widgets.SceneGraphView.Filtering.Target import Target as Target
from typing import ClassVar, Set, Tuple

class MatchAllRuleMatchStrategy(RuleMatchStrategy):
    def execute(self, handle, topLevelHandle, ruleSet): ...

class MatchAnyRuleMatchStrategy(RuleMatchStrategy):
    def execute(self, handle, topLevelHandle, ruleSet): ...

class RuleManager:
    MatchAllPolicy: ClassVar[int] = ...
    MatchAnyPolicy: ClassVar[int] = ...
    def __init__(self, bridge, evaluateRuleCallback: typing.Callable) -> None: ...
    def _RuleManager__callRuleEvaluationCallback(self): ...
    def _RuleManager__populateAvailableMatchingPolicies(self): ...
    def addRule(self, ruleName: str): ...
    def clearRuleCriteria(self, ruleName: str, triggerEvaluation: bool = ...): ...
    def getCurrentRules(self): ...
    def getRuleByName(self, ruleName: str) -> Rule | None: ...
    def getRuleMatchInversion(self) -> bool: ...
    def match(self, handle: SceneGraphHandle[UI4.Widgets.SceneGraphView.SceneGraphHandle.SceneGraphHandle], topLevelHandle: SceneGraphHandle[UI4.Widgets.SceneGraphView.SceneGraphHandle.SceneGraphHandle]) -> bool: ...
    def removeRule(self, ruleName: str): ...
    def renameRule(self, oldName: str, newName: str) -> str: ...
    def setRuleComment(self, ruleName: str, comment: str | None): ...
    def setRuleCriteria(self, ruleName: str, criteriaName: str, criteria: Criteria[UI4.Widgets.SceneGraphView.Filtering.Criteria]): ...
    def setRuleEnabled(self, ruleName: str, isEnabled: bool, triggerEvaluation: bool = ...): ...
    def setRuleEvaluator(self, ruleName: str, evaluator: Evaluator[UI4.Widgets.SceneGraphView.Filtering.Evaluator], useDefaultCriteria: bool = ...): ...
    def setRuleInverted(self, ruleName: str, isInverted: bool, triggerEvaluation: bool = ...): ...
    def setRuleMatchInversion(self, invertMatch: bool): ...
    def setRuleMatchPolicy(self, policy: int): ...
    def setRuleShowChildren(self, ruleName, showChildren, triggerEvaluation: bool = ...): ...
    def setRuleTarget(self, ruleName: str, column: SceneGraphColumn[UI4.Widgets.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn]): ...

class RuleManagerException(Exception):
    def __init__(self, errorMessage) -> None: ...

class RuleMatchStrategy:
    def execute(self, handle: SceneGraphHandle[UI4.Widgets.SceneGraphView.SceneGraphHandle.SceneGraphHandle], topLevelHandle: SceneGraphHandle[UI4.Widgets.SceneGraphView.SceneGraphHandle.SceneGraphHandle], ruleSet) -> bool: ...
