{% import '@ui/tooltip.twig' as tooltip %}
<div class="setting-wrapper">
    <div class="setting-label">
        <label for="google-tables-automatically-update">
            {{ environment.translate('Autoimport from Google Sheet') }}
            {{ tooltip.icon(environment.translate('If checked - table data on frontend will be overloaded from selected Google Sheet. If Google Sheets contains any images the unique description for each is required to not download the redundant copies in Media Library. <a href="%s" tagget="_blank">Read more</a> about how organize Auto Import form Google Sheets') | format('//supsystic.com/documentation/synchronization-table-google-sheet/')) }}
        </label>
    </div>
    <div class="setting-check">
        <input type="checkbox" name="features[import][google][automatically_update]"
            {{ table.settings.features.import.google.automatically_update == 'on' ? 'checked' : '' }}
            data-preview-not-redraw='1' id="google-tables-automatically-update"
            data-target-toggle=".setting-import-from-google"
        />
    </div>
</div>
<div class="setting-wrapper setting-import-from-google setting-suboption"
    {% if table.settings.features.import.google.automatically_update is not defined %}
        style="display:none"
    {% endif %}
>
    <div class="setting-label">
        <label for="google-tables-link">
            {{ environment.translate('Link from Google Tables') }}
            {{ tooltip.icon(environment.translate('Type Google Sheet url to import data from sheet to table')) }}
        </label>
    </div>
    <div class="setting-input">
        <input type="text" name="features[import][google][link]"
            value="{{ table.settings.features.import.google.link }}"
            data-need-settings-save='1' id="google-tables-link"
        />
    </div>
</div>
