<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Trendly_AI_Post_Activator {
    public static function activate() : void {
        // Default options
        if ( ! get_option( 'trendly_ai_post_options' ) ) {
            add_option( 'trendly_ai_post_options', [
                'gemini_api_key' => '',
                'pexels_api_key' => '',
                'region' => 'IN',
                'default_length' => 'medium',
                'default_category' => 0,
                'default_author' => 0,
                'autoschedule_enabled' => 0,
                'autoschedule_frequency' => 'daily-1',
                'autoschedule_time' => '09:00',
            ] );
        }

        // Schedule cron if enabled (default disabled)
        if ( ! wp_next_scheduled( 'trendly_ai_post_cron' ) ) {
            // Not scheduling by default; will be scheduled when user enables it in settings
        }
    }
}
