<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }

if ( ! function_exists( 'tc_fs' ) ) {

	function tc_fs() {

		global $tc_fs;

		if ( ! isset( $tc_fs ) ) {

			// Load Freemius Lite SDK
			require_once TCB_DIR_PATH . 'vendor/freemius-lite/start.php';

			$tc_fs = fs_lite_dynamic_init( array(
				'id'                  => '17493',
				'slug'                => 'tabbed-contents',
                '__FILE__' => TCB_DIR_PATH . 'index.php',
				'premium_slug'        => 'tabbed-contents-pro',
				'type'                => 'plugin',
				'public_key'          => 'pk_787bec9e91498f40f1d0feddec7bc',

				// VERY IMPORTANT
				'is_premium'          => false,
				'has_premium_version' => true,
				'has_addons'          => false,
				'has_paid_plans'      => true,
				'menu'                => array(
					'slug'       => 'edit.php?post_type=tabbed',
					'first-path' => 'edit.php?post_type=tabbed&page=tcb_demo_page',
					'support'    => false,
				),
			) );
		}

		return $tc_fs;
	}

	// Init Freemius
	tc_fs();

	// Signal SDK loaded
	do_action( 'tc_fs_loaded' );
}