from __future__ import annotations

from typing import List, Tuple

ACTIVE_STATUS = "active"
DELETED_STATUS = "deleted"


def active_filter(include_deleted: bool = False) -> Tuple[str, List]:
    if include_deleted:
        return "", []
    return " AND status = ?", [ACTIVE_STATUS]


def sql_active_clause(alias: str = "", include_deleted: bool = False) -> str:
    if include_deleted:
        return ""
    col = f"{alias}.status" if alias else "status"
    return f" AND {col} = '{ACTIVE_STATUS}'"
