"""XDG-konforme Pfade für taninux."""
from __future__ import annotations

import os
from pathlib import Path


def data_dir() -> Path:
    base = os.environ.get("XDG_DATA_HOME") or str(Path.home() / ".local" / "share")
    d = Path(base) / "taninux"
    d.mkdir(parents=True, exist_ok=True)
    return d


def trash_dir() -> Path:
    d = data_dir() / "trash"
    d.mkdir(parents=True, exist_ok=True)
    return d


def state_file() -> Path:
    return data_dir() / "state.json"


def bundles_dir() -> Path:
    d = data_dir() / "bundles"
    d.mkdir(parents=True, exist_ok=True)
    return d


def snapshots_dir() -> Path:
    d = data_dir() / "snapshots"
    d.mkdir(parents=True, exist_ok=True)
    return d
