<?php

namespace AIEO\Claude;

defined( 'ABSPATH' ) || exit;

class Bootstrap {

	
	const CATEGORY = 'aieo';

	
	public static function init() {
		add_action( 'wp_abilities_api_categories_init', array( __CLASS__, 'register_category' ) );
		add_action( 'wp_abilities_api_init', array( __CLASS__, 'register_abilities' ) );
	}

	
	public static function register_category() {
		if ( ! function_exists( 'wp_register_ability_category' ) ) {
			return;
		}

		wp_register_ability_category(
			self::CATEGORY,
			array(
				'label'       => __( 'AI eShop Optimizer', 'ai-eshop-optimizer' ),
				'description' => __( 'AI eShop Optimizer telemetry — audiences, needs, recommendations, attribution, ratings, brand vitals. Read-only.', 'ai-eshop-optimizer' ),
			)
		);
	}

	
	public static function register_abilities() {
		if ( ! function_exists( 'wp_register_ability' ) ) {
			return;
		}

		$base = __DIR__ . '/abilities/';

		
		require_once $base . 'class-period-helper.php';

		
		require_once $base . 'class-list-audiences-ability.php';
		require_once $base . 'class-get-audience-priorities-ability.php';
		require_once $base . 'class-get-customer-archetype-ability.php';

		
		require_once $base . 'class-list-needs-ability.php';
		require_once $base . 'class-find-uncovered-products-ability.php';
		require_once $base . 'class-find-need-gaps-ability.php';

		
		require_once $base . 'class-get-reco-impressions-ability.php';
		require_once $base . 'class-get-reco-conversion-ability.php';
		require_once $base . 'class-top-converting-pairs-ability.php';

		
		require_once $base . 'class-cart-adds-by-source-ability.php';
		require_once $base . 'class-archive-conversion-rates-ability.php';
		require_once $base . 'class-dead-archive-detection-ability.php';

		
		require_once $base . 'class-get-customer-profile-ability.php';
		require_once $base . 'class-find-lookalikes-ability.php';
		require_once $base . 'class-recommend-products-for-customer-ability.php';

		
		require_once $base . 'class-list-brands-ability.php';
		require_once $base . 'class-brand-performance-tiers-ability.php';
		require_once $base . 'class-brand-gift-coverage-ability.php';

		
		require_once $base . 'class-get-rating-leaderboard-ability.php';
		require_once $base . 'class-rating-coverage-by-category-ability.php';
		require_once $base . 'class-find-products-needing-ratings-ability.php';

		
		require_once $base . 'class-attribution-with-engagement-ability.php';
		require_once $base . 'class-addcart-funnel-ability.php';
		require_once $base . 'class-blog-engagement-leaderboard-ability.php';
		require_once $base . 'class-blog-to-product-conversion-ability.php';
		require_once $base . 'class-buy-probability-by-engagement-ability.php';
		require_once $base . 'class-buy-probability-leaderboard-ability.php';
		require_once $base . 'class-abandoned-cart-triage-ability.php';
		require_once $base . 'class-cart-removal-analysis-ability.php';
		require_once $base . 'class-rating-conversion-correlation-ability.php';
		require_once $base . 'class-need-conversion-correlation-ability.php';
		require_once $base . 'class-session-journey-for-addcart-ability.php';

		
		require_once $base . 'class-restock-forecast-ability.php';

		
		require_once $base . 'class-stock-recovery-ability.php';
		require_once $base . 'class-missing-hot-sellers-ability.php';

		
		require_once $base . 'class-abandoned-product-offers-ability.php';

		
		
		
		require_once $base . 'class-dataforseo-status-ability.php';
		require_once $base . 'class-dfs-rankings-abilities.php';

		
		
		require_once $base . 'class-landing-exit-abilities.php';

		Abilities\ListAudiencesAbility::register();
		Abilities\GetAudiencePrioritiesAbility::register();
		Abilities\GetCustomerArchetypeAbility::register();

		Abilities\ListNeedsAbility::register();
		Abilities\FindUncoveredProductsAbility::register();
		Abilities\FindNeedGapsAbility::register();

		Abilities\GetRecoImpressionsAbility::register();
		Abilities\GetRecoConversionAbility::register();
		Abilities\TopConvertingPairsAbility::register();

		Abilities\CartAddsBySourceAbility::register();
		Abilities\ArchiveConversionRatesAbility::register();
		Abilities\DeadArchiveDetectionAbility::register();

		Abilities\GetCustomerProfileAbility::register();
		Abilities\FindLookalikesAbility::register();
		Abilities\RecommendProductsForCustomerAbility::register();

		Abilities\ListBrandsAbility::register();
		Abilities\BrandPerformanceTiersAbility::register();
		Abilities\BrandGiftCoverageAbility::register();

		Abilities\GetRatingLeaderboardAbility::register();
		Abilities\RatingCoverageByCategoryAbility::register();
		Abilities\FindProductsNeedingRatingsAbility::register();

		Abilities\AttributionWithEngagementAbility::register();
		Abilities\AddcartFunnelAbility::register();
		Abilities\BlogEngagementLeaderboardAbility::register();
		Abilities\BlogToProductConversionAbility::register();
		Abilities\BuyProbabilityByEngagementAbility::register();
		Abilities\BuyProbabilityLeaderboardAbility::register();
		Abilities\AbandonedCartTriageAbility::register();
		Abilities\CartRemovalAnalysisAbility::register();
		Abilities\RatingConversionCorrelationAbility::register();
		Abilities\NeedConversionCorrelationAbility::register();
		Abilities\SessionJourneyForAddcartAbility::register();

		Abilities\RestockForecastAbility::register();

		Abilities\StockRecoveryAbility::register();
		Abilities\MissingHotSellersAbility::register();

		Abilities\AbandonedProductOffersAbility::register();

		Abilities\DataForSEOStatusAbility::register();
		Abilities\DfsRankedKeywordsAbility::register();
		Abilities\DfsStrikingDistanceAbility::register();
		Abilities\ContentVitalsLeaderboardAbility::register();

		Abilities\LandingCampaignsAbility::register();
		Abilities\ExitPagesAbility::register();
	}
}
