from typing import Any

from ...with_base.stage_callable import StageCallable
from ...with_base.types import T_in, T_out
from ..processing_strategy import ProcessingStrategy


class ProcessorProcessingStrategy(ProcessingStrategy[T_in, T_out]):
    async def process(
        self,
        payload: T_in,
        stages: list[StageCallable],
        *args: Any,
        **kwds: Any,
    ) -> T_out:
        return await self.processor.process(
            payload=payload, stages=stages, *args, **kwds
        )
