<?php

/**
 * Free Showcase Twitter
 */

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

if( ! class_exists( 'SG_Twitter_Dummy' ) ) {
	class SG_Twitter_Dummy extends GA_Integration {

		/**
		 * Active Indicator
		 * @var boolean
		 */
		public $active = false;

		/**
		 * Integration Image
		 * @var string
		 */
		public $image = '';

		/**
		 * Integration Title
		 * @var string
		 */
		public $title = '';

		/**
		 * Integration Description
		 * @var string
		 */
		public $desc = '';

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

			$this->title = __( 'Twitter', 'giveasap' );
			$this->settings_id = 'sg_twitter_integration';
			$this->image = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/twitter.svg';
			$this->desc = __( 'Enable people to receive entries with Twitter.', 'giveasap' );
		}

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

	}
}

add_filter( 'giveasap_integrations', 'sg_register_twitter_integration' );

/**
 * Registering Twitter
 * @return array
 */
function sg_register_twitter_integration( $integrations ) {

	$integrations['sg_twitter_integration'] = 'SG_Twitter_Dummy';

	return $integrations;
}
