<?php

/**
 * Hide and customize footer credit related code goes here
 */
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
wp_localize_script( 'sapmfly-admin-script', 'sapmfly_fc_data', [
    'nonce'  => wp_create_nonce( 'sapmfly_fc_nonce' ),
    'credit' => get_option( 'sapmfly_custom_footer_credit', '' ),
] );
?>

<!-- site-wide progress bar code goes here -->

<div class="progress-bar-wrap toggle-block-bg">
    <label class="sapmfly-switch-update">
        <div class="progress-bar-header toggle-header">
            <?php 
echo esc_html__( 'Hide Admin Footer Credit', 'minifly' );
?>
            <input type="checkbox" class="sapmfly-setting-toggle" name="sapmfly_hide_footer_credit" <?php 
checked( $hide_footer_credit, 'yes' );
?> />
            <span class="sapmfly-slider"></span>
        </div>
    </label>
    <div class="sapmfly-toggle-resource-body">
        <div class="sapmfly-docs">
            <p>
                <a href="#" target="_blank">
                    <?php 
echo esc_html__( 'Docs', 'minifly' );
?>
                </a>
            </p>
        </div>
        <div class="sapmfly-tags">
            <p><?php 
echo esc_html__( 'New Feature', 'minifly' );
?></p>
        </div>
        <?php 
?>
            <div class="sapmfly-adjust sapmfly-open-fc-popup">
                <p><?php 
echo esc_html__( 'Pro Customization', 'minifly' );
?></p>
            </div>
        <?php 
?>
    </div>
</div>



<!-- Footer Credit Popup Overlay -->
<div class="sapmfly-fc-popup-overlay" style="display:none;">
    <div class="sapmfly-fc-popup-modal">
        <h2><?php 
echo esc_html__( 'Customize Admin Footer Credit', 'minifly' );
?></h2>
        <textarea id="sapmfly_fc_input" rows="2" style="width:100%;"></textarea>
        <div style="margin-top:10px;">
            <button type="button" class="button button-primary sapmfly-save-fc">
                <?php 
echo esc_html__( 'Save', 'minifly' );
?>
            </button>
            <button type="button" class="button sapmfly-empty-fc">
                <?php 
echo esc_html__( 'Empty', 'minifly' );
?>
            </button>
            <button type="button" class="button sapmfly-clear-fc">
                <?php 
echo esc_html__( 'Clear', 'minifly' );
?>
            </button>
            <button type="button" class="button sapmfly-close-popup">
                <?php 
echo esc_html__( 'Close', 'minifly' );
?>
            </button>
        </div>
    </div>
</div>