/**
 * BotFend Anti-Bot Firewall - Threat Dashboard Scripts
 */
(function($) {
    'use strict';

    $(document).ready(function() {
        // Collapsible Cards Logic
        $('.botfend-collapsible-header').on('click', function() {
            var $header = $(this);
            var $content = $header.next('.botfend-collapsible-content');
            var $icon = $header.find('.botfend-toggle-icon');

            $content.slideToggle(250);

            if ($icon.hasClass('dashicons-arrow-up')) {
                $icon.removeClass('dashicons-arrow-up').addClass('dashicons-arrow-down');
            } else {
                $icon.removeClass('dashicons-arrow-down').addClass('dashicons-arrow-up');
            }
        });
    });

})(jQuery);