<?php

if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( !function_exists( 'breadcrumbspress_fs' ) ) {
    // Create a helper function for easy SDK access.
    function breadcrumbspress_fs() {
        global $breadcrumbspress_fs;
        if ( !isset( $breadcrumbspress_fs ) ) {
            $breadcrumbspress_fs = fs_dynamic_init( array(
                'id'               => '17751',
                'slug'             => 'breadcrumbspress',
                'premium_slug'     => 'breadcrumbspress-pro',
                'type'             => 'plugin',
                'public_key'       => 'pk_d298f1e7022344309115f9b618ee8',
                'is_premium'       => false,
                'premium_suffix'   => 'Pro',
                'has_addons'       => false,
                'has_paid_plans'   => true,
                'trial'            => array(
                    'days'               => 7,
                    'is_require_payment' => true,
                ),
                'menu'             => array(
                    'slug'    => 'breadcrumbspress',
                    'contact' => false,
                    'parent'  => array(
                        'slug' => 'options-general.php',
                    ),
                ),
                'is_live'          => true,
                'is_org_compliant' => true,
            ) );
        }
        return $breadcrumbspress_fs;
    }

    // Init Freemius.
    breadcrumbspress_fs();
    // Signal that SDK was initiated.
    do_action( 'breadcrumbspress_fs_loaded' );
    function breadcrumbspress_premium_support_forum_url(  $wp_org_support_forum_url  ) : string {
        return 'https://support.dev4press.com/forums/forum/plugins/breadcrumbspress/';
    }

    if ( breadcrumbspress_fs()->is_premium() ) {
        breadcrumbspress_fs()->add_filter( 'support_forum_url', 'breadcrumbspress_premium_support_forum_url' );
    }
    breadcrumbspress_fs()->add_filter( 'pricing/disable_single_package', '__return_true' );
    breadcrumbspress_fs()->add_filter( 'pricing/show_annual_in_monthly', '__return_false' );
    breadcrumbspress_fs()->add_filter( 'checkout/parameters', function () {
        return array(
            'show_refund_badge'      => true,
            'show_reviews'           => true,
            'billing_cycle_selector' => 'dropdown',
        );
    } );
}