from __future__ import annotations

from bmde.core import logging
from bmde.core.service import Service

from ...core.types import BackendOptions
from .backends.backend import PatchBackend
from .backends.docker import DockerRunner
from .backends.host import HostRunner
from .spec import PatchSpecOpts

log = logging.get_logger(__name__)


class PatchService(Service[PatchSpecOpts, PatchBackend]):
    def __init__(self) -> None:
        super().__init__(
            [BackendOptions.DOCKER, BackendOptions.HOST],
            {BackendOptions.HOST: HostRunner(), BackendOptions.DOCKER: DockerRunner()},
        )
