{
    "version": "1.0.0",
    "layout_name": "plugin_settings",
    "permissions": [
        "core.plugins.update"
    ],
    "extends": "_admin_base",
    "meta": {
        "title": "$t:sirsoft-pay_nicepayments.settings.title",
        "description": "$t:sirsoft-pay_nicepayments.settings.description"
    },
    "data_sources": [
        {
            "id": "settings",
            "label_key": "$t:sirsoft-pay_nicepayments.editor.data_source.settings",
            "type": "api",
            "endpoint": "/api/admin/plugins/{{route.identifier}}/settings",
            "method": "GET",
            "auto_fetch": true,
            "auth_required": true,
            "initLocal": "form",
            "refetchOnMount": true
        },
        {
            "id": "vbank_info",
            "label_key": "$t:sirsoft-pay_nicepayments.editor.data_source.vbank_info",
            "type": "api",
            "endpoint": "/api/plugins/sirsoft-pay_nicepayments/admin/vbank-notify-url",
            "method": "GET",
            "auto_fetch": true,
            "auth_required": true,
            "initLocal": "vbankInfo"
        }
    ],
    "slots": {
        "content": [
            {
                "id": "plugin_settings_content",
                "type": "basic",
                "name": "Div",
                "dataKey": "form",
                "trackChanges": true,
                "props": {
                    "className": "p-4 sm:p-6 lg:p-8 min-h-screen bg-gray-50 dark:bg-gray-900"
                },
                "children": [
                    {
                        "id": "page_header",
                        "type": "composite",
                        "name": "PageHeader",
                        "props": {
                            "title": "$t:sirsoft-pay_nicepayments.settings.title",
                            "description": "$t:sirsoft-pay_nicepayments.settings.description",
                            "backPath": "/admin/plugins",
                            "backLabel": "$t:admin.plugins.back_to_list"
                        }
                    },
                    {
                        "id": "validation_error",
                        "type": "basic",
                        "name": "Div",
                        "if": "{{_local.errors}}",
                        "props": {
                            "className": "alert-danger"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "flex gap-3"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "Icon",
                                        "props": {
                                            "name": "triangle-exclamation",
                                            "className": "w-5 h-5 text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"
                                        }
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "H3",
                                                "props": {
                                                    "className": "text-error-soft"
                                                },
                                                "text": "$t:admin.plugins.settings.validation_error"
                                            },
                                            {
                                                "type": "basic",
                                                "name": "Ul",
                                                "if": "{{typeof _local.errors === 'object' && Object.keys(_local.errors).length > 0}}",
                                                "props": {
                                                    "className": "mt-2 list-disc list-inside space-y-1"
                                                },
                                                "iteration": {
                                                    "source": "Object.entries(_local.errors ?? {}).flatMap(([field, messages]) => Array.isArray(messages) ? messages : [messages])",
                                                    "item_var": "message"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Li",
                                                        "props": {
                                                            "className": "grid-3col-responsive"
                                                        },
                                                        "text": "{{message}}"
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "test_mode_card",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "p-6"
                                },
                                "children": [
                                    {
                                        "id": "field_test_mode",
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.test_mode"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "form-hint"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.test_mode_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "is_test_mode"
                                                }
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "live_mode_warning",
                        "type": "basic",
                        "name": "Div",
                        "if": "{{_local.form && !_local.form.is_test_mode}}",
                        "props": {
                            "className": "mt-6 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg p-4"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "flex gap-3"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "Icon",
                                        "props": {
                                            "name": "triangle-exclamation",
                                            "className": "w-5 h-5 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5"
                                        }
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "H3",
                                                "props": {
                                                    "className": "text-sm font-semibold text-warning-soft"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.live_mode_warning_title"
                                            },
                                            {
                                                "type": "basic",
                                                "name": "P",
                                                "props": {
                                                    "className": "mt-1 text-warning-soft"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.live_mode_warning_body"
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "live_keys_section",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "panel-header-row"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "H3",
                                        "props": {
                                            "className": "text-error-strong"
                                        },
                                        "text": "$t:sirsoft-pay_nicepayments.settings.section_live_keys"
                                    }
                                ]
                            },
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "p-6 space-y-6"
                                },
                                "children": [
                                    {
                                        "id": "field_live_mid",
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "section-heading-md"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-1"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.live_mid"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "form-hint"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.live_mid_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-2"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Div",
                                                        "props": {
                                                            "className": "flex rounded-lg border border-gray-300 dark:border-gray-600 overflow-hidden focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400 focus-within:border-transparent"
                                                        },
                                                        "children": [
                                                            {
                                                                "type": "basic",
                                                                "name": "Span",
                                                                "props": {
                                                                    "className": "inline-flex items-center px-3 bg-gray-100 dark:bg-gray-600 border-r border-gray-300 dark:border-gray-600 text-body font-mono font-bold select-none"
                                                                },
                                                                "text": "SR"
                                                            },
                                                            {
                                                                "type": "basic",
                                                                "name": "Input",
                                                                "props": {
                                                                    "type": "text",
                                                                    "name": "live_mid",
                                                                    "placeholder": "paytestm",
                                                                    "className": "flex-1 font-mono outline-none border-0"
                                                                }
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "mt-1.5 text-tertiary"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.live_mid_example"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "id": "field_live_merchant_key",
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "section-heading-md"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-1"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.live_merchant_key"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "form-hint"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.live_merchant_key_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-2"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Input",
                                                        "props": {
                                                            "type": "password",
                                                            "name": "live_merchant_key",
                                                            "placeholder": "live_key_...",
                                                            "className": "dark:focus:ring-blue-400 focus:border-transparent font-mono"
                                                        }
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "redirect_section",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "panel-header-row"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "H3",
                                        "props": {
                                            "className": "text-error-strong"
                                        },
                                        "text": "$t:sirsoft-pay_nicepayments.settings.section_redirect"
                                    }
                                ]
                            },
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "p-6 space-y-6"
                                },
                                "children": [
                                    {
                                        "id": "field_redirect_success_url",
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "section-heading-md"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-1"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.redirect_success_url"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "form-hint"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.redirect_success_url_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-2"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Input",
                                                        "props": {
                                                            "type": "text",
                                                            "name": "redirect_success_url",
                                                            "placeholder": "/shop/orders/{orderId}/complete",
                                                            "className": "dark:focus:ring-blue-400 focus:border-transparent"
                                                        }
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "id": "field_redirect_fail_url",
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "section-heading-md"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-1"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.redirect_fail_url"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "form-hint"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.redirect_fail_url_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "props": {
                                                    "className": "lg:col-span-2"
                                                },
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Input",
                                                        "props": {
                                                            "type": "text",
                                                            "name": "redirect_fail_url",
                                                            "placeholder": "/shop/checkout",
                                                            "className": "dark:focus:ring-blue-400 focus:border-transparent"
                                                        }
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "vbank_notify_section",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-blue-200 dark:border-blue-800"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "px-6 py-4 border-b border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-900/20 rounded-t-lg"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex-center gap-2"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Icon",
                                                "props": {
                                                    "name": "bell",
                                                    "className": "w-4 h-4 text-blue-600 dark:text-blue-400"
                                                }
                                            },
                                            {
                                                "type": "basic",
                                                "name": "H3",
                                                "props": {
                                                    "className": "text-base font-semibold text-blue-900 dark:text-blue-100"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.section_vbank_notify"
                                            }
                                        ]
                                    }
                                ]
                            },
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "p-6"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "P",
                                        "props": {
                                            "className": "text-label mb-3"
                                        },
                                        "text": "$t:sirsoft-pay_nicepayments.settings.vbank_notify_hint"
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex-center gap-2"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Input",
                                                "props": {
                                                    "type": "text",
                                                    "readOnly": true,
                                                    "value": "{{_local.vbankInfo?.url ?? '/plugins/sirsoft-pay_nicepayments/payment/vbank-notify'}}",
                                                    "className": "input-readonly flex-1 font-mono"
                                                }
                                            },
                                            {
                                                "type": "basic",
                                                "name": "Button",
                                                "props": {
                                                    "className": "flex-center gap-1.5 px-3 py-2 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-body border border-gray-300 dark:border-gray-600 rounded-lg font-medium transition-colors whitespace-nowrap"
                                                },
                                                "actions": [
                                                    {
                                                        "type": "click",
                                                        "handler": "sequence",
                                                        "actions": [
                                                            {
                                                                "handler": "copyToClipboard",
                                                                "params": {
                                                                    "text": "{{_local.vbankInfo?.url ?? '/plugins/sirsoft-pay_nicepayments/payment/vbank-notify'}}"
                                                                }
                                                            },
                                                            {
                                                                "handler": "toast",
                                                                "params": {
                                                                    "type": "success",
                                                                    "message": "$t:sirsoft-pay_nicepayments.settings.vbank_notify_copied"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                ],
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Icon",
                                                        "props": {
                                                            "name": "copy",
                                                            "className": "w-4 h-4"
                                                        }
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "Span",
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.copy"
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "escrow_section",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "p-6"
                                },
                                "children": [
                                    {
                                        "id": "field_use_escrow",
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.use_escrow"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "form-hint"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.use_escrow_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "use_escrow"
                                                }
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "easy_pay_section",
                        "_comment_hidden": "간편결제는 차후 오픈 예정 — 현재는 렌더링 차단. 오픈 시 if 키 제거하면 복원됨.",
                        "if": "{{false}}",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
                        },
                        "children": [
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "panel-header-row"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "H3",
                                        "props": {
                                            "className": "text-error-strong"
                                        },
                                        "text": "$t:sirsoft-pay_nicepayments.settings.section_easy_pay"
                                    },
                                    {
                                        "type": "basic",
                                        "name": "P",
                                        "props": {
                                            "className": "form-hint"
                                        },
                                        "text": "$t:sirsoft-pay_nicepayments.settings.section_easy_pay_hint"
                                    }
                                ]
                            },
                            {
                                "type": "basic",
                                "name": "Div",
                                "props": {
                                    "className": "divide-y divide-gray-100 dark:divide-gray-700"
                                },
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4 bg-blue-50 dark:bg-blue-900/20"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_allow_with_other_pg"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "mt-0.5 text-tertiary"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_allow_with_other_pg_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_allow_with_other_pg"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_naverpay"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "mt-0.5 text-xs text-green-600 dark:text-green-400"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_naverpay_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_naverpay"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Label",
                                                "props": {
                                                    "className": "form-label"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_kakaopay"
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_kakaopay"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Label",
                                                "props": {
                                                    "className": "form-label"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_samsungpay"
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_samsungpay"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Div",
                                                "children": [
                                                    {
                                                        "type": "basic",
                                                        "name": "Label",
                                                        "props": {
                                                            "className": "form-label"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_applepay"
                                                    },
                                                    {
                                                        "type": "basic",
                                                        "name": "P",
                                                        "props": {
                                                            "className": "mt-0.5 text-tertiary"
                                                        },
                                                        "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_applepay_hint"
                                                    }
                                                ]
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_applepay"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Label",
                                                "props": {
                                                    "className": "form-label"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_payco"
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_payco"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Label",
                                                "props": {
                                                    "className": "form-label"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_skpay"
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_skpay"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Label",
                                                "props": {
                                                    "className": "form-label"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_ssgpay"
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_ssgpay"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Div",
                                        "props": {
                                            "className": "flex items-center justify-between px-6 py-4"
                                        },
                                        "children": [
                                            {
                                                "type": "basic",
                                                "name": "Label",
                                                "props": {
                                                    "className": "form-label"
                                                },
                                                "text": "$t:sirsoft-pay_nicepayments.settings.easy_pay_lpay"
                                            },
                                            {
                                                "type": "composite",
                                                "name": "Toggle",
                                                "props": {
                                                    "name": "easy_pay_lpay"
                                                }
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "footer_buttons",
                        "type": "basic",
                        "name": "Div",
                        "props": {
                            "className": "sticky bottom-0 z-10 flex justify-end items-center gap-3 mt-6 px-4 py-3 bg-gray-50 border border-gray-200 rounded-lg dark:bg-gray-800 dark:border-gray-700"
                        },
                        "children": [
                            {
                                "id": "cancel_button",
                                "type": "basic",
                                "name": "Button",
                                "props": {
                                    "className": "btn btn-secondary"
                                },
                                "actions": [
                                    {
                                        "type": "click",
                                        "handler": "navigate",
                                        "params": {
                                            "path": "/admin/plugins"
                                        }
                                    }
                                ],
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "Span",
                                        "text": "$t:common.cancel"
                                    }
                                ]
                            },
                            {
                                "id": "save_button",
                                "type": "basic",
                                "name": "Button",
                                "props": {
                                    "disabled": "{{!_local.hasChanges || _local.isSaving}}",
                                    "className": "btn btn-primary flex-center gap-1.5"
                                },
                                "actions": [
                                    {
                                        "type": "click",
                                        "handler": "sequence",
                                        "actions": [
                                            {
                                                "handler": "setState",
                                                "params": {
                                                    "target": "local",
                                                    "isSaving": true,
                                                    "errors": null
                                                }
                                            },
                                            {
                                                "handler": "apiCall",
                                                "auth_required": true,
                                                "target": "/api/admin/plugins/{{route.identifier}}/settings",
                                                "params": {
                                                    "method": "PUT",
                                                    "body": "{{_local.form}}"
                                                },
                                                "onSuccess": [
                                                    {
                                                        "handler": "setState",
                                                        "params": {
                                                            "target": "local",
                                                            "isSaving": false,
                                                            "hasChanges": false
                                                        }
                                                    },
                                                    {
                                                        "handler": "toast",
                                                        "params": {
                                                            "type": "success",
                                                            "message": "$t:admin.plugins.settings.save_success"
                                                        }
                                                    },
                                                    {
                                                        "handler": "refetchDataSource",
                                                        "params": {
                                                            "dataSourceId": "settings"
                                                        }
                                                    }
                                                ],
                                                "onError": [
                                                    {
                                                        "handler": "setState",
                                                        "params": {
                                                            "target": "local",
                                                            "isSaving": false,
                                                            "errors": "{{$error.errors}}"
                                                        }
                                                    },
                                                    {
                                                        "handler": "toast",
                                                        "params": {
                                                            "type": "error",
                                                            "message": "$t:admin.plugins.settings.save_error"
                                                        }
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "children": [
                                    {
                                        "type": "basic",
                                        "name": "Icon",
                                        "if": "{{_local.isSaving}}",
                                        "props": {
                                            "name": "spinner",
                                            "className": "spinner-sm"
                                        }
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Span",
                                        "if": "{{!_local.isSaving}}",
                                        "text": "$t:common.save"
                                    },
                                    {
                                        "type": "basic",
                                        "name": "Span",
                                        "if": "{{_local.isSaving}}",
                                        "text": "$t:common.saving"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}