<?php

use Dolphy\Plugin\Ajax\Action;
use Dolphy\Plugin\Ajax\Response;

defined('DOLPHY_PLUGIN') or die('Access Denied!');

add_filter('dolphy_admin_tabs', function ($tabs, $page) {

  switch ($page) {
    case 'dolphy': {
      // $tabs[] = array(
      //   'text' => 'General Settings',
      //   'name' => 'general',
      //   'component' => 'dolphy-settings-general'
      // );

      $tabs[] = array(
        'text' => 'Access Settings',
        'name' => 'access',
        'component' => 'dolphy-settings-access'
      );
    } break;

    case 'dolphy-security': {
      $tabs[] = array(
        'text' => 'Two-Factor Authentication',
        'name' => '2fa',
        'component' => 'dolphy-security-2fa'
      );

      // $tabs[] = array(
      //   'text' => 'Bruteforce Protection',
      //   'name' => 'bruteforce',
      //   'component' => 'dolphy-security-bruteforce'
      // );

      // $tabs[] = array(
      //   'text' => 'Google reCAPTCHA',
      //   'name' => 'recaptcha',
      //   'component' => 'dolphy-security-recaptcha'
      // );

      // $tabs[] = array(
      //   'text' => 'XSS Protection',
      //   'name' => 'xss',
      //   'component' => 'dolphy-security-xss'
      // );

      // $tabs[] = array(
      //   'text' => 'DDoS Protection',
      //   'name' => 'ddos',
      //   'component' => 'dolphy-security-ddos'
      // );
    } break;
  }

  return $tabs;
}, 1, 2);
