```python
from typing import List, Dict, Tuple


def _why_refused(cap: Tuple[int, int], left: int, amount: int) -> str:
    if cap is None:
        return "unknown"
    if amount > cap[1]:
        return "single"
    return "cap" if amount > left else ""


def apply_charges(caps: dict, charges: List[Tuple[str, str, int]]) -> Dict[str, Dict[str, int]]:
    left = {name: cap[0] for name, cap in caps.items()}
    refused = []
    for charge_id, bucket, amount in charges:
        if not isinstance(amount, int) or amount <= 0:
            raise ValueError("amount must be a positive whole number")
        cap = caps.get(bucket)
        if cap is None:
            refused.append((charge_id, "unknown"))
            continue
        if amount > cap[1]:
            refused.append((charge_id, "single"))
            continue
        if amount > left[bucket]:
            refused.append((charge_id, "cap"))
            continue
        left[bucket] -= amount
    return {"left": left, "refused": refused}
```