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

    <t t-name="dadata_connector.SearchField" owl="1">
        <div class="o_search_content d-inline-flex w-100">
            <t t-if="props.readonly">
                <span t-esc="props.record.data[props.name]"/>
            </t>
            <t t-else="">
                <input class="o_input flex-grow-1"
                       t-att-id="props.id"
                       type="text"
                       autocomplete="off"
                       t-att-placeholder="props.placeholder"
                       t-ref="input" />
                <button
                    t-if="props.record.data[props.name]"
                    class="btn btn-secondary fa fa-search ms-1"
                    data-tooltip="Search in DaData"
                    aria-label="Search in DaData"
                    t-on-click="() => this.search()"/>
            </t>
        </div>
    </t>

</templates>
