from __future__ import annotations

from .base import TaskProvider
from .mock import MockTaskProvider

PROVIDERS = {
    "mock": MockTaskProvider(),
}


def get_provider(name: str) -> TaskProvider:
    key = str(name or "").strip().lower()
    return PROVIDERS.get(key, PROVIDERS["mock"])


def list_providers() -> list[TaskProvider]:
    return list(PROVIDERS.values())
