"""
Default values for all merchant settings groups.
Single source of truth used by: seeder, reset endpoint, get_setting_with_default() fallback.
"""
from typing import Dict

MERCHANT_SETTINGS_DEFAULTS: Dict[str, Dict[str, str]] = {
    "vt_settings": {
        "auth_pre_auth": "true",
        "auth_request_auth": "true",
        "details_quick_charge": "true",
        "details_item_details": "true",
        "freq_single": "true",
        "freq_split": "true",
        "freq_recurring": "true",
        "method_card": "true",
        "method_ach": "true",
        "method_cash": "true",
        "method_cheque": "true",
        "method_split_tender": "true",
        "late_fee_btn_1": "1.5",
        "late_fee_btn_2": "2",
        "late_fee_btn_3": "5",
        "late_fee_btn_4": "10",
        "late_fee_btn_type": "percentage",
        "cap_fee_btn_1": "5",
        "cap_fee_btn_2": "10",
        "cap_fee_btn_3": "25",
        "cap_fee_btn_4": "50",
        "cap_fee_btn_type": "amount",
        "enable_attachments": "true",
        "enable_customer_message": "true",
        "enable_discounts": "true",
        "receipt_email": "true",
        "receipt_sms": "true",
    },
    "hpp_settings": {
        "tip_btn_1": "10",
        "tip_btn_2": "15",
        "tip_btn_3": "20",
        "tip_btn_4": "25",
        "tip_btn_type": "percentage",
        "display_payer_ip": "false",
        "display_payer_location": "false",
    },
    "invoice_settings": {
        "show_item_description": "true",
        "show_customer_name": "true",
        "show_transaction_time": "true",
        "show_invoice_number": "true",
    },
    "receipt_settings": {
        "show_item_description": "true",
        "show_customer_name": "true",
        "show_transaction_time": "true",
        "show_receipt_number": "true",
    },
    "Logo": {
        "logo_url": "",
        "logo_file_id": "",
    },
    "Colors": {
        "primary_color": "#28B4ED",
        "secondary_color": "#4A6271",
        "accent_color": "#FB7585",
    },
    "Business URLs": {
        "website_url": "",
        "support_email": "",
        "support_phone": "",
        "show_website_url": "true",
        "show_support_email": "true",
        "show_support_phone": "true",
    },
}

ALL_SETTINGS_GROUPS = list(MERCHANT_SETTINGS_DEFAULTS.keys())

SETTINGS_GROUP_MAP = {
    "vt":       ["vt_settings"],
    "hpp":      ["hpp_settings"],
    "invoice":  ["invoice_settings"],
    "receipt":  ["receipt_settings"],
    "branding": ["Colors", "Business URLs"],
}

USER_PREFERENCE_DEFAULTS = {
    "date_format": "MM/DD/YYYY",
    "time_format": "12h",
    "timezone": "America/New_York",
    "language": "en",
    "currency_display": "symbol",
    "notifications_email": True,
    "notifications_sms": False,
}
