<?php
/**
 * Presenting the integration with Eleemntor on the free version.
 */

namespace Simple_Giveaways;

if ( ! class_exists( '\Simple_Giveaways\SG_Elementor_Dummy' ) ) {
	class SG_Elementor_Dummy extends GA_Integration {

		/**
		 * Setting initial params
		 */
		public function __construct() {

			$this->title       = __( 'Elementor', 'giveasap' );
			$this->settings_id = 'sg_elementor';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/elementor.png';
			$this->desc        = __( 'Adds Giveaway related widgets in the Elementor Page Builder', 'giveasap' );

		}

		public function buttons( $integrations ) {
			echo '<a href="' . esc_url( giv_fs()->get_upgrade_url() ) . '" class="button button-primary">' . esc_html__( 'Upgrade to PRO', 'giveasap' ) . '</a>';
		}

	}

	add_filter( 'giveasap_integrations', '\Simple_Giveaways\sg_elementor_register' );

	/**
	 * Registering Math Captcha
	 *
	 * @return array
	 */
	function sg_elementor_register( $integrations ) {

		$integrations['sg_elementor'] = '\Simple_Giveaways\SG_Elementor_Dummy';

		return $integrations;
	}
}
