<?php
// If uninstall not called from WordPress, exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    exit;
}

function lucidpen_uninstall() {

    // Load constants.
    require_once plugin_dir_path( __FILE__ ) . 'include/constants.php';

    // Option names to delete (locally scoped — NOT global).
    $option_constants = [
        LCPN_OPT_SLUG_PRAYER,
        LCPN_OPT_SLUG_BLOG,
        LCPN_OPT_SLUG_BSF,
        LCPN_OPT_OPENAI_DEPLOYMENT,
        LCPN_OPT_OPENAI_API_ENDPOINT,
        LCPN_OPT_OPENAI_API_KEY,
    ];

    foreach ( $option_constants as $option_name ) {
        delete_option( $option_name );
    }
}

// Execute uninstall logic.
lucidpen_uninstall();
