<?php
/**
 * CatalogFrame Image Studio
 *
 * @package           CatalogFrameImageStudio
 * @author            theAI Studio
 * @copyright         2026 theAI Studio
 * @license           GPL-2.0-or-later
 *
 * @wordpress-plugin
 * Plugin Name:       CatalogFrame Image Studio
 * Plugin URI:        https://taistudio.co/catalogframe
 * Description:       Generate catalog-ready product images through the provider-neutral WordPress AI Client.
 * Version:           1.0.3
 * Requires at least: 7.0
 * Requires PHP:      7.4
 * Author:            theAI Studio
 * Author URI:        https://taistudio.co/
 * Text Domain:       catalogframe-image-studio
 * License:           GPL v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 */

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

define( 'CFIS_VERSION', '1.0.3' );
define( 'CFIS_PLUGIN_FILE', __FILE__ );
define( 'CFIS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'CFIS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'CFIS_PLUGIN_SLUG', 'catalogframe-image-studio' );
define( 'CFIS_MANAGE_CAPABILITY', 'catalogframe_manage_jobs' );

require_once CFIS_PLUGIN_DIR . 'includes/class-cfis-product-mapper.php';
require_once CFIS_PLUGIN_DIR . 'includes/class-cfis-rest-controller.php';
require_once CFIS_PLUGIN_DIR . 'includes/class-cfis-admin.php';
require_once CFIS_PLUGIN_DIR . 'includes/class-cfis-plugin.php';

register_activation_hook( __FILE__, array( 'CatalogFrame_Image_Studio\\Plugin', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'CatalogFrame_Image_Studio\\Plugin', 'deactivate' ) );

add_action(
	'plugins_loaded',
	static function () {
		CatalogFrame_Image_Studio\Plugin::instance()->init();
	}
);
