<?php
/**
 * PayPal Payment Gateway Premium Widget
 *
 * This widget appears in the Elementor panel when PayPal gateway is available.
 * The actual payment buttons are rendered within the checkout widget.
 *
 * @package GGM_Commerce
 */

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

require_once __DIR__ . '/widget-paypal-gateway/elementor-render.php';

/**
 * Class GGM_Commerce_Widget_PayPal_Gateway
 *
 * Elementor widget for PayPal payment display.
 */
class GGM_Commerce_Widget_PayPal_Gateway extends GGM_Commerce_Premium_Widget {

	/**
	 * Premium widget slug for license check.
	 *
	 * @var string
	 */
	protected $premium_widget_slug = 'paypal-gateway';

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

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

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

	/**
	 * Get widget keywords.
	 *
	 * @return array
	 */
	public function get_keywords() {
		return array( 'ggm', 'commerce', 'paypal', 'payment', 'checkout', 'premium' );
	}

	/**
	 * Register widget controls.
	 *
	 * @return void
	 */
	protected function register_controls() {
		require __DIR__ . '/widget-paypal-gateway/elementor-controls.php';
		require __DIR__ . '/widget-paypal-gateway/elementor-controls-style.php';
	}

	/**
	 * Render premium content.
	 *
	 * @return void
	 */
	protected function render_premium_content() {
		ggmc_paypal_gateway_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();
	}
}
