/* *********** Custom Alert Javascript *********** */
jQuery(document).ready(function($) {
    $('body').append('<div id="custom-toolbar" class="custom-toolbar"><div class="top-custom-toolbar-wrapper"><div class="deploy-sync-content--message-toolbar-wrapper"><span>This content has been edited in production :   </span></div><form action="'+deploy_sync_content__ajax_url+'" method="post"><input name="redirect-url" type="hidden" value="'+window.location.href+'"><input name="data-to-import" type="hidden" value=\''+deploy_sync_content__import_data+'\'><div class="deploy-sync-content--btn-toolbar-wrapper"><button name="submit-updatepost" type="submit" id="btn-deploy-sync-content-update-content">Update Now</button></div><input type="hidden" name="deploy_sync_content__nonce" value="'+deploy_sync_content__nonce+'"></form><div class="deploy-sync-content--close-toolbar-wrapper"><span id="custom-close" class="close-button">&times;</span></div></div></div>');
    
    if ($('body').hasClass('elementor-editor-wp-post') || $('body').hasClass('post-php')) {
        // Show the toolbar when on the post edit page
        $('#custom-toolbar').slideDown();
    }
    // Show the toolbar when the button is clicked
    $('#custom-button').on('click', function() {
        $('#custom-toolbar').slideDown();
    });
    // Hide the toolbar when the close button is clicked
    $('#custom-close').on('click', function() {
        $('#custom-toolbar').slideUp();
    });

});

