<?php

/**
 * Free Showcase Integration Class
 */

namespace Simple_Giveaways;

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

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

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

			$this->title       = __( 'WooCommerce - Follow Up Emails', 'giveasap' );
			$this->settings_id = 'sg_wc_follow_up_emails';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/woocommerce_logo.svg';
			$this->desc        = __( 'Send Follow up emails when people join a giveaway', 'giveasap' );
		}

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

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


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

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

		$integrations['sg_wc_follow_up_emails'] = '\Simple_Giveaways\SG_WC_Follow_Up_Emails_Dummy';

		return $integrations;
	}
}
