# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type

from lark_oapi.event.processor import IEventProcessor
from .model.p2_performance_review_data_changed_v2 import P2PerformanceReviewDataChangedV2
from .model.p2_performance_stage_task_open_result_v2 import P2PerformanceStageTaskOpenResultV2


class P2PerformanceReviewDataChangedV2Processor(IEventProcessor[P2PerformanceReviewDataChangedV2]):
    def __init__(self, f: Callable[[P2PerformanceReviewDataChangedV2], None]):
        self.f = f

    def type(self) -> Type[P2PerformanceReviewDataChangedV2]:
        return P2PerformanceReviewDataChangedV2

    def do(self, data: P2PerformanceReviewDataChangedV2) -> None:
        self.f(data)


class P2PerformanceStageTaskOpenResultV2Processor(IEventProcessor[P2PerformanceStageTaskOpenResultV2]):
    def __init__(self, f: Callable[[P2PerformanceStageTaskOpenResultV2], None]):
        self.f = f

    def type(self) -> Type[P2PerformanceStageTaskOpenResultV2]:
        return P2PerformanceStageTaskOpenResultV2

    def do(self, data: P2PerformanceStageTaskOpenResultV2) -> None:
        self.f(data)
