<?php
/**
 * Presenting the integration with BuddyPress on the free version.
 */

namespace Simple_Giveaways;

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

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

			$this->title       = __( 'BuddyPress', 'giveasap' );
			$this->settings_id = 'sg_buddypress';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/buddypress.svg';
			$this->desc        = __( 'Show the Giveaways under the profile tabs. Feed the Activity stream.', '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_buddypress_register' );

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

	$integrations['sg_buddypress'] = '\Simple_Giveaways\SG_BuddyPress_Dummy';

	return $integrations;
}
