{% set associations_warning = summary["top_associations"] and summary["top_associations"][0]["cramer_v"] is gt high_association_threshold %}
{% set associations_title -%}
Show which columns are similar (have a strong association).
{%- if associations_warning %}
<br>
<br>
<strong>NOTE:</strong> some columns have very strong associations and may be redundant.
{%- endif -%}
{% endset %}

<div>
    <div class="flex-reverse space-between tab-list-wrapper">
        <div class="tab-list" data-manager="TabList">
            <div>
                <button type="button"
                        data-target-panel-id="dataframe-sample-panel"
                        data-role="tab"
                        data-is-selected
                        data-test="sample-tab"
                        class="tab">Table preview</button>
                <div class="tab-tooltip-anchor tooltip">
                    <span class="tooltip-text tooltip-right">Display a few rows of the
                        dataframe
                        in a table.</span>
                </div>
            </div>
            <div>
                <button type="button"
                        data-target-panel-id="column-summaries-panel"
                        data-role="tab"
                        data-test="summaries-tab"
                        class="tab">Column summaries</button>
                <div class="tab-tooltip-anchor tooltip">
                    <span class="tooltip-text tooltip-center">Summary statistics and
                        plots for all
                        columns in the dataframe.</span>
                </div>
            </div>
            <div>
                <button type="button"
                        data-target-panel-id="column-associations-panel"
                        data-role="tab"
                        class="tab"
                        {% if associations_warning %}
                        data-has-warning
                        {% endif %}
                        data-test="associations-tab">Column
                    similarities</button>
                <div class="tab-tooltip-anchor tooltip">
                    <span
                        class="tooltip-text tooltip-left">{{ associations_title }}</span>
                </div>
            </div>
        </div>

        {% include "column-filter.html" %}

    </div>
    <div class="tab-list-border"></div>
</div>

<div class="tab-panel"
     id="dataframe-sample-panel"
     data-test="sample-panel">
    {% include "dataframe-sample.html" %}
</div>
<div class="tab-panel"
     id="column-summaries-panel"
     data-hidden
     data-test="summaries-panel">
    {% include "column-summaries.html" %}
</div>
<div class="tab-panel"
     id="column-associations-panel"
     data-hidden
     data-test="associations-panel">
    {% include "column-associations.html" %}
</div>
