<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="view_fusion_xml_import_wizard_form" model="ir.ui.view">
        <field name="name">fusion.xml.import.wizard.form</field>
        <field name="model">fusion.xml.import.wizard</field>
        <field name="arch" type="xml">
            <form string="Import ADP XML Files">
                <group invisible="state != 'draft'">
                    <group>
                        <field name="xml_files" widget="many2many_binary" string="XML Files"/>
                    </group>
                    <div class="alert alert-info" role="alert">
                        <strong>Import ADP XML Data Files</strong>
                        <p class="mb-0">
                            Upload one or more XML data files exported from ADP applications.
                            The system will parse each file and create or update client profiles
                            with personal information, medical conditions, device details, and
                            authorizer information.
                        </p>
                    </div>
                </group>
                <group invisible="state != 'done'">
                    <field name="result_message" widget="text" nolabel="1" colspan="2"/>
                </group>
                <field name="state" invisible="1"/>
                <footer>
                    <button string="Import" name="action_import" type="object"
                            class="btn-primary" invisible="state != 'draft'"/>
                    <button string="Close" class="btn-secondary" special="cancel"/>
                </footer>
            </form>
        </field>
    </record>

    <record id="action_xml_import_wizard" model="ir.actions.act_window">
        <field name="name">Import XML Files</field>
        <field name="res_model">fusion.xml.import.wizard</field>
        <field name="view_mode">form</field>
        <field name="target">new</field>
    </record>
</odoo>
