<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <record id="res_config_settings_view_form_sms_api" model="ir.ui.view">
            <field name="name">res.config.settings.view.form.inherit.sms.api</field>
            <field name="model">res.config.settings</field>
            <field name="inherit_id" ref="base.res_config_settings_view_form"/>
            <field name="arch" type="xml">
                <xpath expr="//div[@id='business_documents']" position="after">
                    <h2>SMS API Configuration</h2>
                    <div class="row mt16 o_settings_container" id="sms_api_settings">
                        
                        <div class="col-12 col-lg-6 o_setting_box">
                            <div class="o_setting_right_pane">
                                <span class="o_form_label">Mode</span>
                                <div class="text-muted">
                                    Enable or disable SMS sending
                                </div>
                                <div class="content-group">
                                    <div class="row mt16">
                                        <label for="sms_mode" class="col-lg-3 o_light_label"/>
                                        <field name="sms_mode"/>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="col-12 col-lg-6 o_setting_box" attrs="{'invisible': [('sms_mode', '=', 'test')]}">
                            <div class="o_setting_right_pane">
                                <span class="o_form_label">API Credentials</span>
                                <div class="text-muted">
                                    Credentials for your SMS provider
                                </div>
                                <div class="content-group">
                                    <div class="row mt16">
                                        <label for="sms_api_url" string="API URL" class="col-lg-4 o_light_label"/>
                                        <field name="sms_api_url" attrs="{'required': [('sms_mode', '=', 'prod')]}" placeholder="e.g. https://api.twilio.com/2010-04-01/Accounts/AC.../Messages.json"/>
                                    </div>
                                    <div class="row mt16">
                                        <label for="sms_api_token" string="API Token" class="col-lg-4 o_light_label"/>
                                        <field name="sms_api_token" attrs="{'required': [('sms_mode', '=', 'prod')]}" password="True"/>
                                    </div>
                                    <div class="row mt16">
                                        <label for="sms_sender_name" string="Sender Name" class="col-lg-4 o_light_label"/>
                                        <field name="sms_sender_name" attrs="{'required': [('sms_mode', '=', 'prod')]}"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                </xpath>
            </field>
        </record>

    </data>
</odoo>