<?php
defined('ABSPATH') || exit;
?>

<div class="card">
    <h2><span class="dashicons dashicons-media-text"></span>&nbsp;<?php esc_html_e('Logs', 'iv1-wp-tools'); ?></h2>

    <p>
        <?php esc_html_e('View plugin log files created by IV1 WP Tools.', 'iv1-wp-tools'); ?>
    </p>

    <p>
        <label for="iv1wpt-log-file">
            <strong><?php esc_html_e('Log file', 'iv1-wp-tools'); ?></strong>
        </label><br>

        <select id="iv1wpt-log-file" style="min-width:320px;">
            <option value=""><?php esc_html_e('Loading...', 'iv1-wp-tools'); ?></option>
        </select>

        <select id="iv1wpt-log-lines">
            <option value="100">100</option>
            <option value="250" selected>250</option>
            <option value="500">500</option>
            <option value="1000">1000</option>
        </select>

        <button type="button" class="button" id="iv1wpt-log-view">
            <?php esc_html_e('View log', 'iv1-wp-tools'); ?>
        </button>

        <button type="button" class="button button-secondary" id="iv1wpt-logs-clear">
            <?php esc_html_e('Clear selected log', 'iv1-wp-tools'); ?>
        </button>
    </p>

    <div id="iv1wpt-logs-result" style="margin-top:16px;"></div>
</div>