<?php

/**
 * Free Showcase EDD Integration Class
 */

namespace Simple_Giveaways;

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

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

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

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

			$this->title       = __( 'GiveWP', 'giveasap' );
			$this->settings_id = 'sg_give';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/give.svg';
			$this->desc        = __( 'Award users for donating.', '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>';
		}

	}
}

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

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

	$integrations['sg_give'] = '\Simple_Giveaways\SG_Give_Dummy';

	return $integrations;
}
