<set SHOW_FILTERS_FORM = "{{ '/event' === @CURRENT_PATH || '/watchlist' === @CURRENT_PATH }}" />
<set SHOW_USERS_TAGS = "{{'/watchlist' === @CURRENT_PATH }}" />

<check if="@SHOW_FILTERS_FORM">
<check if="{{ isset(@showChart) && 1 === @showChart }}">
    <div class="main-graph separate-graph">
        <check if="@SHOW_FILTERS_FORM">
            <true>
                <include href="templates/parts/forms/filtersForm.html" />
            </true>
        </check>
        <div class="stat-chart"></div>
    </div>
</check>
</check>

<div class="card events-card">
    <header class="card-header">
        <div class="card-header-title">
            <check if="{{ isset(@title) }}">
                <true>{{ @title }}</true>
                <false>{{ @AdminEvents_table_title }}</false>
            </check>
            <span>&#8943;</span><p class="tooltip-info tooltip" title="{{ @AdminEvents_table_title_tooltip }}"><include href="images/icons/information.svg" alt=''/>
            </p>
        </div>
    </header>

    <div class="card-table">
        <div class="content">

            <check if="@SHOW_USERS_TAGS">
                <true>
                <div id="important-users">
                    <repeat group="{{ @IMPORTANT_USERS }}" value="{{ @RECORD }}" >
                    <div class="control">
                        <div class="tags has-addons">
                            <a class="tag is-link" data-id="{{ @RECORD.id }}" href="/id/{{ @RECORD.id }}">{{ @RECORD.userid }}</a>
                            <a class="tag is-delete"></a>
                        </div>
                    </div>
                    </repeat>
                </div>
                </true>
            </check>

            <check if="@SHOW_FILTERS_FORM">
                <false>
                <div class="main-graph">
                    <div class="stat-chart"></div>
                </div>
                </false>
            </check>

            <check if="@SHOW_FILTERS_FORM">
                <true>
                    <include href="templates/parts/forms/searchForm.html" />
                    <include href="templates/parts/choices/eventType.html" />
                    <include href="templates/parts/choices/rules.html" />
                    <include href="templates/parts/choices/deviceType.html" />
                </true>
            </check>

            <table class="table dim-table" id="user-events-table">
                <thead>
                    <tr>
                        <check if="{{ isset(@USER) }}">
                            <true>
                                <th class="tooltip event-user-col" title="{{ @Base_table_column_session_tooltip }}">{{ @Base_table_column_session }}</th>
                            </true>
                            <false>
                                <th class="tooltip event-user-col" title="{{ @Base_table_column_user_risk_score_and_email_tooltip }}">{{ @Base_table_column_user_risk_score_and_email }}</th>
                            </false>
                        </check>
                        <th class="tooltip event-timestamp-col" title="{{ @Base_table_column_last_action_timestamp_tooltip }}">{{ @Base_table_column_last_action_timestamp }}</th>
                        <th class="tooltip event-event-type-col" title="{{ @Base_table_column_event_type_tooltip }}">{{ @Base_table_column_event_type }}</th>
                        <th class="tooltip event-ip-col" title="{{ @Base_table_column_ip_tooltip }}">{{ @Base_table_column_ip }}</th>
                        <th class="tooltip event-ip-type-col" title="{{ @Base_table_column_ip_type_tooltip }}">{{ @Base_table_column_ip_type }}</th>
                        <th class="tooltip event-device-col" title="{{ @Base_table_column_device_tooltip }}">{{ @Base_table_column_device }}</th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
