"""OS strategy interface for dekk execution helpers."""

from __future__ import annotations

from collections.abc import Mapping, Sequence
from pathlib import Path
from typing import Protocol, runtime_checkable


@runtime_checkable
class DekkOS(Protocol):
    """OS-specific strategy surface for dekk."""

    @property
    def name(self) -> str: ...

    @property
    def path_separator(self) -> str: ...

    def wrapper_filename(self, name: str) -> str: ...
    def python_command_candidates(self) -> tuple[str, ...]: ...
    def npm_command_candidates(self) -> tuple[str, ...]: ...
    def conda_runtime_paths(self, prefix: Path) -> tuple[Path, ...]: ...
    def cmake_library_dir(self, prefix: Path) -> Path: ...
    def cmake_package_dir(self, prefix: Path, package: str) -> Path: ...
    def cmake_runtime_dir(self, prefix: Path) -> Path: ...
    def shared_library_path_var(self) -> str | None: ...
    def venv_bin_dir(self, venv_path: Path) -> Path: ...
    def venv_python(self, venv_path: Path) -> Path: ...
    def venv_pip(self, venv_path: Path) -> Path: ...
    def make_wrapper_executable(self, path: Path) -> None: ...
    def render_wrapper(
        self,
        *,
        target: Path,
        env_vars: Mapping[str, str],
        path_prepends: Sequence[str],
        project_name: str,
        prepend_vars: Mapping[str, str] | None = None,
        python: Path | None = None,
    ) -> str: ...


__all__ = ["DekkOS"]
