<?xml version="1.0" encoding="UTF-8" ?>
<templates id="template" xml:space="preserve">

    <t t-inherit="point_of_sale.PartnerDetailsEdit" t-inherit-mode="extension">
        <xpath expr="//input[@name='name']" position="attributes">
            <attribute
                name="t-attf-style"
            >display: {{changes.is_company ? 'block': 'none'}}</attribute>
        </xpath>
        <xpath expr="//div[hasclass('partner-details-left')]/div[1]" position="before">
            <div class="partner-detail">
                <span class='label'>Company</span>
                <input
                    type='checkbox'
                    class='detail o_checkbox checkbox is_company'
                    name='is_company'
                    t-att-checked="changes.is_company ? 'checked' : null"
                    t-on-change="captureChange"
                    t-model="changes.is_company"
                />
                <div
                    class="is_person"
                    t-on-change="captureChange"
                    t-attf-style="display: {{!changes.is_company ? 'block': 'none'}};"
                >
                    <div class='partner-detail'>
                        <span class='label'>Last Name</span>
                        <input
                            class='detail lastname person'
                            name="lastname"
                            t-on-change="captureChange"
                            t-model="changes.lastname"
                            placeholder="LastName"
                        />
                    </div>
                </div>
            </div>
                <div
                class="is_person"
                t-on-change="captureChange"
                t-attf-style="display: {{!changes.is_company ? 'block': 'none'}};"
            >
                    <div class='partner-detail'>
                        <span class='label'>First Name</span>
                        <input
                        class='detail firstname person'
                        name="firstname"
                        t-on-change="captureChange"
                        t-model="changes.firstname"
                        placeholder="FirstName"
                    />
                    </div>
                </div>
        </xpath>
    </t>

</templates>
