from __future__ import annotations

from decimal import Decimal

SLA_TARGET_HOURS = Decimal("8.0")
PENDING_STATUSES = {
    "submitted",
    "review",
    "pending_review",
    "manager_review",
    "budget_review",
    "finance_review",
    "approving",
}
SUCCESS_STATUSES = {"approved", "pending_payment", "paid", "completed"}
EXCLUDED_SPEND_STATUSES = {"draft", "rejected", "returned", "supplement", "deleted"}
EMPTY_DONUT = [{"name": "暂无数据", "value": 0, "color": "#cbd5e1"}]
EXPENSE_TYPE_ALIASES = {
    "travel_application": "travel",
    "business_travel": "travel",
    "trip": "travel",
    "traffic": "travel",
    "transportation": "travel",
    "hotel": "travel",
    "accommodation": "travel",
    "business_meal": "meal",
    "communication_fee": "communication",
}
CHART_COLORS = [
    "var(--theme-primary)",
    "var(--chart-blue)",
    "var(--chart-amber)",
    "var(--chart-purple)",
    "var(--success)",
    "var(--danger)",
]
STAGE_LABELS = {
    "manager": "直属经理",
    "manager_review": "直属经理",
    "budget": "预算复核",
    "budget_review": "预算复核",
    "finance": "财务审核",
    "finance_review": "财务审核",
    "payment": "付款确认",
    "pending_payment": "付款确认",
}
RISK_SIGNAL_LABELS = {
    "duplicate_invoice": "重复发票",
    "split_billing": "拆分报销",
    "frequent_small_claims": "高频小额",
    "location_mismatch": "地点不一致",
    "amount_outlier": "金额异常",
    "preapproval_absent": "缺少事前申请",
    "missing_material": "材料不完整",
    "budget_pressure": "预算压力偏高",
    "budget_overrun": "预算超支",
    "budget_warning": "预算预警",
    "over_budget": "预算超支",
    "invoice_abnormal": "发票异常",
    "invoice_missing": "缺少发票",
    "missing_invoice": "缺少发票",
    "policy_violation": "政策不符",
    "abnormal_frequency": "频次异常",
    "manual_review": "人工复核",
}
