<?php

namespace GriffinForms\Admin\Language;

class AntiSpam extends \GriffinForms\Admin\Language\Settings
{
    protected static $instance;
    
    protected function enableHoneyPotLabel()
    {
        return __('Honeypot field', 'griffinforms-form-builder');
    }
    
    protected function enableHoneyPotCheckboxLabel()
    {
        return __('Yes, add honeypot field for all forms.', 'griffinforms-form-builder');
    }
    
    protected function enableHoneyPotDescription()
    {
        return __('Protect your forms from spam by activating a hidden honeypot field. When enabled, this invisible field helps identify and block automated bot submissions without impacting the user experience.', 'griffinforms-form-builder');
    }

    protected function enableRecaptchaLabel()
    {
        return __('reCAPTCHA', 'griffinforms-form-builder');
    }

    protected function enableRecaptchaCheckboxLabel()
    {
        return __('Use Google reCAPTCHA with forms', 'griffinforms-form-builder');
    }

    protected function recaptchaSiteKeyLabel()
    {
        return __('Site key', 'griffinforms-form-builder');
    }

    protected function recaptchaSiteKeyDescription()
    {
        $url = 'https://www.google.com/recaptcha/admin/';
        /* translators: %s is the URL to the Google reCAPTCHA admin console */
        return sprintf(__('Enter your Google reCAPTCHA Site Key. You can obtain this key from the <a href="%s" target="_blank">Google reCAPTCHA admin console</a>.', 'griffinforms-form-builder'), esc_url($url));
    }

    protected function recaptchaSecretKeyLabel()
    {
        return __('Secret key', 'griffinforms-form-builder');
    }

    protected function recaptchaSecretKeyDescription()
    {
        return __('Enter your Google reCAPTCHA Secret Key. This key is used to communicate between your site and Google reCAPTCHA.', 'griffinforms-form-builder');
    }

    protected function recaptchaVersionLabel()
    {
        return __('Choose reCAPTCHA version.', 'griffinforms-form-builder');
    }

    protected function recaptchaVersionDescription()
    {
        return __('Choose the reCAPTCHA version. Version 3 is recommended for multi-page forms to avoid token timeouts during submission.', 'griffinforms-form-builder');
    }

    protected function recaptchaVersionv2()
    {
        return __('Version 2', 'griffinforms-form-builder');
    }

    protected function recaptchaVersionv3()
    {
        return __('Version 3', 'griffinforms-form-builder');
    }

    // Notices

    protected function recaptchaSiteKeyRequired()
    {
        return __('reCAPTCHA Site Key is required.', 'griffinforms-form-builder');
    }

    protected function recaptchaSecretKeyRequired()
    {
        return __('reCAPTCHA Secret Key is required.', 'griffinforms-form-builder');
    }

    protected function rateLimitStorageLabel()
    {
        return __('Rate Limiter Storage', 'griffinforms-form-builder');
    }

    protected function rateLimitStorageDescription()
    {
        return __('Choose where GriffinForms should store temporary data used for blocking bots. "Transient" means it will use WordPress\' built‑in short‑term cache (good for most sites). "Custom table" means a separate table just for this data (best for high‑traffic sites that want full control).', 'griffinforms-form-builder');
    }

    protected function rateLimitStorageOptionAuto()
    {
        return __('Set Automatically', 'griffinforms-form-builder');
    }

    protected function rateLimitStorageOptionTransient()
    {
        return __('WordPress Transient', 'griffinforms-form-builder');
    }

    protected function rateLimitStorageOptionDb()
    {
        return __('Custom Table', 'griffinforms-form-builder');
    }

    protected function rateLimitStorageInvalid()
    {
        return __('You selected an invalid option.', 'griffinforms-form-builder');
    }

    public static function getInstance()
    {
        if (self::$instance == null)
        {
            self::$instance = new AntiSpam();
        }
        
        return self::$instance;
    }
    
    private function __construct() 
    {
    }
}