<?php

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

class AIEO_DMM_Insights_Chat extends AIEO_DMM_Module_Base {

	public function get_id()       { return 'insights_chat'; }
	public function get_label()    { return __( 'Insights Chat', 'ai-eshop-optimizer' ); }
	public function get_priority() { return 5; } 
	public function get_group()    { return 'tools'; }

	public function is_pro_locked() { return true; }
	public function get_pro_promo() {
		return array(
			'title'       => __( 'Insights Chat (Claude-powered)', 'ai-eshop-optimizer' ),
			'description' => __( 'Ask your shop questions in plain language. Cross-cuts orders, products, attribution, recommendations, ratings, blog engagement, and customer profiles through 33 purpose-built data abilities. No SQL, no exports, no analyst.', 'ai-eshop-optimizer' ),
			'bullets'     => array(
				__( 'Pre-built suggestion chips covering attribution, blog, brand portfolio, customers, ratings, needs, and campaigns.', 'ai-eshop-optimizer' ),
				__( 'Claude resolves the right abilities and grounds every answer in YOUR live data.', 'ai-eshop-optimizer' ),
				__( 'Stays inside WooCommerce — no third-party BI subscription, no data export.', 'ai-eshop-optimizer' ),
			),
		);
	}

	
	public function render_subtab() {
		if ( ! class_exists( 'AIEO_Merchant_Chat' ) ) {
			echo '<div class="aieo-dmm-card"><p style="color:#b91c1c;">'
				. esc_html__( 'Merchant Chat backend is not loaded. Check that includes/chat/class-aieo-merchant-chat.php is included from the plugin bootstrap.', 'ai-eshop-optimizer' )
				. '</p></div>';
			return;
		}
		AIEO_Merchant_Chat::render_page();
	}
}
