<?php

/**
 * Free Showcase Zero Bounce Integration
 */

namespace Simple_Giveaways;

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

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

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

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

			$this->title       = __( 'Zero Bounce', 'giveasap' );
			$this->settings_id = 'sg_zero_bounce';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/zero-bounce.png';
			$this->desc        = __( 'Validate the Subscriber Email with Zero Bounce.', '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_register_zero_bounce' );

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

	$integrations['sg_zero_bounce'] = '\Simple_Giveaways\SG_Zero_Bounce_Dummy';

	return $integrations;
}
