<?xml version="1.0" encoding="utf-8"?>
<templates>
    <t t-name="odex30_account_online_sync.ConnectedUntil">
        <div t-on-mouseenter="onMouseEnter" t-on-mouseleave="onMouseLeave" t-att-class="cssClasses">
            <t t-if="state.displayReconnectButton">
                <button class="btn btn-danger" t-on-click="extendConnection">
                    Reconnect Bank
                </button>
            </t>
            <t t-else="">
                <t t-if="!this.state.isHovered">
                    <i class="fa fa-warning" t-if="isConnectionExpiredIn(3)"/>
                    Connected until <t t-out="this.props.record.data.expiring_synchronization_date.toFormat('MMM dd')"/>
                </t>
                <t t-elif="this.state.isHovered">
                    <a class="oe_inline oe_kanban_action" href="#" t-on-click="extendConnection">
                        Extend Connection
                    </a>
                </t>
            </t>
        </div>
    </t>
</templates>
