<?php

/**
 * Free Showcase Integration Class
 */

namespace Simple_Giveaways;

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

if ( ! class_exists( 'SG_Tiktok_Dummy' ) ) {
	class SG_Tiktok_Dummy extends GA_Integration {

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

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

			$this->title       = __( 'TikTok', 'giveasap' );
			$this->settings_id = 'sg_tiktok';
			$this->image       = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/tiktok.svg';
			$this->desc        = __( 'Create TikTok giveaways where users can pick their videos to win.', '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_tiktok_integration' );

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

	$integrations['sg_tiktok'] = '\Simple_Giveaways\SG_Tiktok_Dummy';

	return $integrations;
}
