<?php

/**
 * Free Showcase Integration Class
 */

namespace Simple_Giveaways;

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

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

		/**
		 * Get Categories
		 *
		 * @return string[]
		 */
		public function get_categories() {
			return [
				'email',
				'marketing',
				'automation',
			];
		}

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

			$this->title       = __( 'FluentCRM', 'giveasap' );
			$this->settings_id = 'sg_fluentcrm';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/fluentcrm.svg';
			$this->desc        = __( 'Sends users to your contact list in FluentCRM', '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_fluentcrm_integration' );

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

	$integrations['sg_fluentcrm'] = '\Simple_Giveaways\SG_FluentCRM_Dummy';

	return $integrations;
}
