from ..settings import AppSettings
from .base import ProxmoxService
from .fake import FakeProxmoxService
from .proxmox import LiveProxmoxService, ProxmoxApiClient


class ProxmoxServiceFactory:
    @staticmethod
    def create(settings: AppSettings) -> ProxmoxService:
        if settings.is_live_configured:
            return LiveProxmoxService(ProxmoxApiClient(settings))
        return FakeProxmoxService()
