<?php

namespace ThemePaste\SecureAdmin\Classes\Pro;

defined( 'ABSPATH' ) || exit;

use ThemePaste\SecureAdmin\Interfaces\FeatureInterface;
use ThemePaste\SecureAdmin\Traits\Hook;

/**
 * Feature: AdvancedMalwareScanner
 * @since   1.0.0
 */
class AdvancedMalwareScanner implements FeatureInterface {
    use Hook;

    /** Unique feature ID for settings reference. */
    private $feature_id = 'advanced-malware-scanner';

    /**
     * Register hooks for the feature.
     */
    public function register_hooks() {

        // Settings label
        // $this->filter( 'tpsa_settings_option', [$this, 'extend_pro_settings'] );
    }

    /**
     * Extend the settings array with a new option for checking the DB table prefix.
     *
     * @param array $settings The settings array to extend.
     *
     * @return array The extended settings array.
     */
    public function extend_pro_settings( $settings ) {

        $new_item_key = $this->feature_id;
        $new_item = [
            'label'  => __( 'Malware Scanner', 'admin-safety-guard' ),
            'class'  => '',
            'is_pro' => true,
        ];

        // Desired position
        $position = 2;

        // Insert at the specific position
        $settings = array_slice( $settings, 0, $position, true )
         + [$new_item_key => $new_item]
         + array_slice( $settings, $position, null, true );

        return $settings;
    }

}