/**
 * Paws & Care Admin Upsell Scripts
 * 
 * JavaScript for admin notices and upsell functionality
 * @package Paws_And_Care
 * @since 0.0.1
 */

(function($) {
    'use strict';

    /**
     * Initialize admin scripts when document is ready
     */
    $(document).ready(function() {
        pawsAndCareInitNoticeDismiss();
    });

    /**
     * Handle admin notice dismiss via AJAX
     */
    function pawsAndCareInitNoticeDismiss() {
        $(document).on('click', '.paws-welcome-notice .notice-dismiss', function() {
            $.ajax({
                url: pawsAdminData.ajaxUrl,
                type: 'POST',
                data: {
                    action: 'paws_and_care_dismiss_notice',
                    nonce: pawsAdminData.nonce
                }
            });
        });
    }

})(jQuery);
