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

use Codexpert\WC_Affiliate\Helper;
?>
<div class="wc-affiliate-form-builder-wrapper <?php if( ! Helper::has_pro() ) echo esc_attr( 'original-content' ); ?>">
    <?php echo apply_filters( 'wc_affiliate_dynamic_form_builder_content', '' ); ?>
</div>

<!-- overlay shown to non-pro users -->
<?php if( ! Helper::has_pro() ) : ?>
<div class="wc-affiliate-pro-overlay" role="dialog" aria-labelledby="upgrade-title" aria-modal="true">
    <div class="wc-affiliate-pro-card" role="document">
        <h2 id="upgrade-title"><?php esc_html_e( 'Upgrade to Pro', 'wc-affiliate' ); ?></h2>
        <p><?php esc_html_e( 'Unlock form builder features and more.', 'wc-affiliate' ); ?></p>
        <div class="wsp-footer">
            <a target="_blank" class="wsp-button button button-primary" href="<?php echo esc_url( 'https://codexpert.io/wc-affiliate/' ); ?>"><?php esc_html_e( 'Learn More', 'wc-affiliate' ); ?></a>
            <a target="_blank" href="<?php echo esc_url( 'https://wcaffiliate.com/pricing/?utm_source=inplugin&utm_medium=button&utm_campaign=year-end' ); ?>" class="wsp-button button button-primary wf-feature-unlock-btn">
                <span class="dashicons dashicons-lock"></span> <?php esc_html_e( 'Unlock This Feature', 'wc-affiliate' ); ?>
            </a>
        </div>
    </div>
</div>
<?php endif; ?>
