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

    <t t-name="pos_restaurant.TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension">
        <xpath expr="//div[hasclass('order-row')]//div[@name='delete-column'] | //tr[hasclass('order-row')]//td[@name='delete-column']" position="inside">
            <div t-if="state.filter == 'TIPPING'" class="col end narrow p-2" name="tip">
                <div t-if="ui.isSmall">Tip</div>
                <div><TipCell order="order" /></div>
            </div>
        </xpath>
        <xpath expr="//SearchBar" position="before">
            <button class="settle-tips btn btn-lg btn-primary" t-if="state.filter == 'TIPPING'" t-on-click="settleTips">Settle</button>
        </xpath>
         <xpath expr="//div[@id='order-tags']" position="after">
            <t t-set="tableTag" t-value="getTableTag(order)"/>
            <div t-if="tableTag" t-attf-class="badge rounded o_colorlist_item_color_1 ms-1" style="font-size: 0.75rem !important;">
                Table <t t-esc="tableTag" />
            </div>
        </xpath>
    </t>

    <t t-name="pos_restaurant.TipCell">
        <div class="tip-cell" t-on-click.stop="editTip">
            <t t-if="state.isEditing">
                <input type="text" name="tip-amount" t-ref="autofocus" t-model="orderUiState.inputTipAmount" t-on-blur="onBlur" t-on-keydown="onKeydown" />
            </t>
            <div t-else="">
                <t t-esc="tipAmountStr"></t>
            </div>
        </div>
    </t>

</templates>
