<?php
/**
 * Kit Contents Widget (Premium)
 *
 * Displays the components of a kit or build product.
 *
 * @package GGM_Commerce
 */

// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

require_once __DIR__ . '/widget-kit-contents/elementor-render.php';

/**
 * Class GGM_Commerce_Widget_Kit_Contents
 *
 * Premium widget for displaying kit/build components on product pages.
 */
class GGM_Commerce_Widget_Kit_Contents extends GGM_Commerce_Premium_Widget {

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

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

	/**
	 * Get widget title.
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return 'Kit Contents';
	}

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

	/**
	 * Get widget keywords.
	 *
	 * @return array Widget keywords.
	 */
	public function get_keywords() {
		return array( 'ggm', 'commerce', 'kit', 'build', 'components', 'bundle', 'contents', 'parts', 'premium' );
	}

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

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

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