<?php
/**
 * Fires when the plugin is deleted from the WP admin. Cleans up all options.
 *
 * @package AetherisAIChat
 */

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

delete_option( 'aetheris_ai_chat_settings' );

// Multisite — clear options on every site too.
if ( is_multisite() ) {
	$aetheris_site_ids = get_sites( array( 'fields' => 'ids' ) );
	foreach ( $aetheris_site_ids as $aetheris_site_id ) {
		switch_to_blog( $aetheris_site_id );
		delete_option( 'aetheris_ai_chat_settings' );
		restore_current_blog();
	}
}
