<?php
/**
 * Review List Widget (Premium)
 *
 * Displays product reviews with various display options.
 *
 * @package GGM_Commerce
 */

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

require_once __DIR__ . '/widget-review-list/elementor-render.php';

/**
 * Class GGM_Commerce_Widget_Review_List
 *
 * Premium widget for displaying product reviews.
 */
class GGM_Commerce_Widget_Review_List extends GGM_Commerce_Premium_Widget {

	/**
	 * Premium widget slug for license activation check.
	 *
	 * @var string
	 */
	protected $premium_widget_slug = 'product-reviews';

	/**
	 * Get widget name.
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'ggmc-review-list';
	}

	/**
	 * Get widget title.
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return __( 'Review List', 'ggm-commerce' );
	}

	/**
	 * Get widget icon.
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'eicon-comments';
	}

	/**
	 * Get widget keywords.
	 *
	 * @return array Widget keywords.
	 */
	public function get_keywords() {
		return array( 'product', 'review', 'reviews', 'comments', 'rating', 'ggm-commerce', 'premium' );
	}

	/**
	 * Register widget controls.
	 */
	protected function register_controls() {
		require __DIR__ . '/widget-review-list/elementor-controls.php';
		require __DIR__ . '/widget-review-list/elementor-controls-style.php';
	}

	/**
	 * Render the premium widget content.
	 */
	protected function render_premium_content() {
		ggmc_review_list_render_premium_content( $this );
	}

	/**
	 * Get default styles for this widget.
	 * Uses centralized configuration from default-widget-styles.php
	 *
	 * @return array Default styles.
	 */
	public static function get_static_default_styles() {
		return self::get_defaults_from_config();
	}
}
