{
    "_doc": {
        "storage": "Each section key (e.g. 'general', 'logging') is used as the module key in the app_settings table — NOT the module name. Use AppSettingService::get('general', 'field') to read, not get('Core', 'field').",
        "sections": "Multiple modules can contribute fields to the same section. Avoid field name collisions by prefixing module-specific fields (e.g. 'sfm_currency') when the field is not intentionally shared."
    },
    "settings": {
        "logging": [
            {
                "field": "log_enabled",
                "type": "checkbox",
                "label": "Enable Logging",
                "description": "Master switch — disables all log recording when off",
                "default": true
            },
            {
                "field": "log_nav",
                "type": "checkbox",
                "label": "Log navigation (nav)",
                "description": "Record every page visit and user action",
                "default": true
            },
            {
                "field": "log_nav_reads",
                "type": "checkbox",
                "label": "Log page reads (GET)",
                "description": "Also log read-only requests (GET). Off = only mutations (POST, PATCH, DELETE) and Livewire actions are recorded",
                "default": false
            },
            {
                "field": "log_info",
                "type": "checkbox",
                "label": "Log informational (info)",
                "description": "Record scheduled jobs and module events",
                "default": true
            },
            {
                "field": "log_warning",
                "type": "checkbox",
                "label": "Log warnings (warning)",
                "description": "Record unexpected but non-critical situations",
                "default": true
            },
            {
                "field": "log_error",
                "type": "checkbox",
                "label": "Log errors (error)",
                "description": "Record failures, DB errors and exceptions",
                "default": true
            },
            {
                "field": "log_audit",
                "type": "checkbox",
                "label": "Log audit (model changes)",
                "description": "Record model create/update/delete events",
                "default": true
            },
            {
                "field": "log_email",
                "type": "checkbox",
                "label": "Log outgoing emails (email)",
                "description": "Record every email the system sends (recipient, subject, body preview) under System Logs → channel 'mail'. Off by default — can generate a lot of entries.",
                "default": false
            }
        ],
        "general": [
            {
                "field": "full_access",
                "type": "checkbox",
                "label": "Full Access",
                "description": "Full access to the system for any user",
                "default": false
            },
            {
                "field": "decimals_calc",
                "input": "input",
                "type": "number",
                "label": "Decimals to use for calculations",
                "description": "Number of decimals to use in the system",
                "default": 6,
                "step": 1
            },
            {
                "field": "decimals_show",
                "input": "input",
                "type": "number",
                "label": "Decimals to show in the system",
                "description": "Number of decimals to show in the system",
                "default": 2,
                "step": 1
            },
            {
                "field": "currency",
                "type": "select",
                "label": "Currency",
                "description": "Currency used in the system",
                "default": "GTQ",
                "translate_options": true,
                "options": [
                    { "label": "GTQ — Quetzal (Q)", "value": "GTQ" },
                    { "label": "USD — Dólar ($)",   "value": "USD" },
                    { "label": "EUR — Euro (€)",    "value": "EUR" },
                    { "label": "MXN — Peso MX ($)", "value": "MXN" },
                    { "label": "HNL — Lempira (L)", "value": "HNL" }
                ]
            },
            {
                "field": "date_format",
                "type": "select",
                "label": "Date format",
                "description": "Format used to display dates in the system",
                "default": "d/m/Y",
                "options": [
                    { "label": "DD/MM/YYYY", "value": "d/m/Y" },
                    { "label": "MM/DD/YYYY", "value": "m/d/Y" },
                    { "label": "YYYY-MM-DD", "value": "Y-m-d" }
                ]
            },
            {
                "field": "decimal_separator",
                "input": "input",
                "type": "text",
                "label": "Decimal separator",
                "description": "Symbol used to separate decimals (default: .)",
                "default": "."
            },
            {
                "field": "thousands_separator",
                "input": "input",
                "type": "text",
                "label": "Thousands separator",
                "description": "Symbol used to group thousands (default: ,). Leave empty to disable.",
                "default": ","
            }
        ]
    }
}
