<?php
if (!defined('ABSPATH')) {
    exit;
}
/* @var UpVimeo_Api_Helper $upvimeo_vimeo_helper */

$upvimeo_vimeo_helper = isset($args['upvimeo_helper']) ? $args['upvimeo_helper'] : (isset($upvimeo_vimeo_helper) ? $upvimeo_vimeo_helper : null);
$upvimeo_db_helper = isset($args['db_helper']) ? $args['db_helper'] : (isset($upvimeo_db_helper) ? $upvimeo_db_helper : null);
$upvimeo_settings_helper = isset($args['settings_helper']) ? $args['settings_helper'] : (isset($upvimeo_settings_helper) ? $upvimeo_settings_helper : null);

/* @var UpVimeo_Db_Helper $upvimeo_db_helper */
/* @var UpVimeo_Settings_Helper $upvimeo_settings_helper */
?>

<div class="upvimeo-header wvv-mb-20">
    <h2 class="wvv-mb-0"><?php esc_html_e('Vimeo Videos', 'upvimeo-direct-uploads'); ?></h2>
    <div class="upvimeo-header-actions">
        <a href="<?php echo esc_url(admin_url('admin.php?page=' . UpVimeo_Admin::PAGE_VIMEO . '&action=new')); ?>"
            class="button-primary">
            <span class="dashicons dashicons-plus-alt2" style="line-height: 28px; font-size: 18px;"></span>
            <?php esc_html_e('Upload new', 'upvimeo-direct-uploads'); ?>
        </a>

        <?php if (current_user_can(apply_filters('UPVIMEO_manage_options_capability', 'manage_options'))): ?>
            <a href="<?php echo esc_url(upvimeo_get_settings_url()); ?>" class="button-secondary"
                title="<?php esc_attr_e('Settings', 'upvimeo-direct-uploads'); ?>">
                <span class="dashicons dashicons-admin-tools"></span>
            </a>
        <?php endif; ?>

        <?php /*
        <a id="upvimeo-vimeo-stats" href="#" class="button-secondary" title="<?php esc_attr_e('Statistics', 'upvimeo'); ?>">
            <span class="dashicons dashicons-chart-bar"></span>
        </a>
        */ ?>
    </div>
</div>

<div class="wvv-box">
    <form method="get">
        <input type="hidden" name="page" value="<?php echo esc_attr(UpVimeo_Admin::PAGE_VIMEO); ?>">
        <?php
        $upvimeo_list_table = new UpVimeo_List_Table();
        $upvimeo_list_table->prepare_items();
        $upvimeo_list_table->search_box(esc_html__('Search', 'upvimeo-direct-uploads'), 'search_id');
        $upvimeo_list_table->views();
        $upvimeo_list_table->display();
        ?>
    </form>
</div>