<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="view_adp_import_wizard_form" model="ir.ui.view">
        <field name="name">fusion_claims.adp.import.wizard.form</field>
        <field name="model">fusion_claims.adp.import.wizard</field>
        <field name="arch" type="xml">
            <form string="Import Claim Submission Files">
                <group invisible="state != 'draft'">
                    <group string="Individual Files">
                        <field name="txt_files" widget="many2many_binary" string="TXT Files"/>
                    </group>
                    <group string="Folder Upload (ZIP)">
                        <field name="zip_file" filename="zip_filename"/>
                        <field name="zip_filename" invisible="1"/>
                    </group>
                    <div class="alert alert-info" role="alert">
                        <strong>Import Claim Submission Files</strong>
                        <p class="mb-0">
                            <b>Option 1:</b> Drag and drop individual .txt files above.<br/>
                            <b>Option 2:</b> ZIP your folder(s) and upload. All subfolders
                            will be scanned for .txt files automatically.<br/>
                            You can use both options at once. Duplicates are skipped.
                        </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_adp_import_wizard" model="ir.actions.act_window">
        <field name="name">Import Submission Files</field>
        <field name="res_model">fusion_claims.adp.import.wizard</field>
        <field name="view_mode">form</field>
        <field name="target">new</field>
    </record>
</odoo>
