<?xml version="1.0" encoding="UTF-8" ?>
<templates>
    <t t-name="odex30_account_reports.AccountReportEditPopover">
        <div class="account_report_popover_edit">
            <t t-if="props.cell.figure_type === 'boolean'">
                <div class="edit_popover_boolean">
                    <!-- Yes -->
                    <input
                        id="edit_popover_boolean_true"
                        name="edit_popover_boolean"
                        type="radio"
                        value="1"
                        t-att-checked="props.cell.no_format"
                        t-ref="booleanTrue"
                    />
                    <label for="edit_popover_boolean_true">Yes</label>

                    <!-- No -->
                    <input
                        id="edit_popover_boolean_false"
                        name="edit_popover_boolean"
                        type="radio"
                        value="0"
                        t-att-checked="!props.cell.no_format"
                        t-ref="booleanFalse"
                    />
                    <label for="edit_popover_boolean_false">No</label>
                </div>
            </t>
            <t t-elif="props.cell.figure_type === 'string'">
                <textarea class="edit_popover_string" rows="3" t-ref="input">
                    <t t-out="props.cell.no_format"/>
                </textarea>
            </t>
            <t t-elif="props.cell.figure_type === 'percentage'">
                <div class="input-group">
                    <input
                        class="form-control"
                        type="text"
                        inputmode="numeric"
                        t-ref="input"
                        t-att-value="props.cell.no_format"
                    />
                    <span class="input-group-text">%</span>
                </div>
            </t>
            <t t-elif="props.cell.figure_type === 'monetary' and props.cell.currency_symbol">
                <div class="input-group">
                    <input
                        class="form-control"
                        type="text"
                        inputmode="numeric"
                        t-ref="input"
                        t-att-value="props.cell.no_format"
                    />
                    <span class="input-group-text">
                        <t t-out="props.cell.currency_symbol"/>
                    </span>
                </div>
            </t>
            <t t-else="">
                <input
                    type="text"
                    inputmode="numeric"
                    t-ref="input"
                    t-att-value="props.cell.no_format"
                />
            </t>

            <button class="btn btn-sm mt-2" t-on-click="() => this.edit()">
                Post
            </button>
        </div>
    </t>
</templates>
