<?php
/**
 * Aysa Automation Configuration
 * 
 * Backend configuration for automation reporting settings
 * These settings are not user-configurable and should only be modified by developers
 */

if (!defined('WPINC')) {
    die;
}

/**
 * Automation Reporting Configuration
 */
class Aysa_Automation_Config {
    private static function get_api_base_url() {
        if (class_exists('Aysa_API_Config') && method_exists('Aysa_API_Config', 'get_api_base_url')) {
            return rtrim((string) Aysa_API_Config::get_api_base_url(), '/');
        }

        return 'https://api.aysa.ai';
    }
    
    /**
     * Get automation reporting configuration
     * 
     * @return array Configuration settings
     */
    public static function get_reporting_config() {
        return array(
            'enabled' => true,
            'mode' => 'immediate', // immediate, batch, scheduled
            'endpoint' => self::get_api_base_url() . '/api/automation-reports',
            'timeout' => 15,
            'batch_size' => 50,
            'retry_attempts' => 3,
            'retry_delay' => 5 // seconds
        );
    }
    
    /**
     * Get feedback configuration
     * 
     * @return array Feedback settings
     */
    public static function get_feedback_config() {
        return array(
            'enabled' => true,
            'endpoint' => self::get_api_base_url() . '/api/feedback',
            'categories' => array(
                'suggestion' => 'Feature Suggestion',
                'bug' => 'Bug Report',
                'general' => 'General Feedback',
                'performance' => 'Performance Issue',
                'usability' => 'Usability Feedback'
            ),
            'timeout' => 10
        );
    }
}
