<?php
/**
 * Class SG_MyCred
 */

namespace Simple_Giveaways;

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

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

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

			$this->title       = __( 'myCRED', 'giveasap' );
			$this->settings_id = 'sg_mycred';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/mycred.png';
			$this->desc        = __( 'Allow subscribers to spend myCRED points for entries.', '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_mycred_registr' );

/**
 * Registering Math Captcha
 *
 * @return array
 */
function sg_mycred_registr( $integrations ) {

	$integrations['sg_mycred'] = '\Simple_Giveaways\SG_MyCred_Dummy';

	return $integrations;
}
