<?php

/**
 * Free Showcase Drip
 */

namespace Simple_Giveaways;

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

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

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

			$this->title       = __( 'Drip', 'giveasap' );
			$this->settings_id = 'sg_drip';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/drip.png';
			$this->desc        = __( 'Add subscribers to your Drip Campaigns', '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>';
		}

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

	}
}

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

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

	$integrations['sg_drip'] = '\Simple_Giveaways\SG_Drip_Dummy';

	return $integrations;
}
