<?php

/**
 * Free Showcase MailChimp Integration Class
 */

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

if( ! class_exists( 'GA_Active_Campaign_Dummy' ) ) {
	class GA_Active_Campaign_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 = __( 'Active Campaign', 'giveasap' );
			$this->settings_id = 'ga_active_campaign';
			$this->image = 'https://assets.reviews.com/uploads/2015/09/25001133/activecampaign-logo.png';
			$this->desc = __( 'Sends users to your list and grow your email list', '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', 'giveasap_active_campaign' );

/**
 * Registering mailchimp
 * @return array
 */
function giveasap_active_campaign( $integrations ) {

	$integrations['ga_active_campaign'] = 'GA_Active_Campaign_Dummy';

	return $integrations;
}