jQuery(document).ready(function($) {
    // Handle cancel order button clicks
    $('.wpdd-cancel-btn').on('click', function(e) {
        if (!confirm(wpdd_order_manager.confirm_cancel)) {
            e.preventDefault();
            return false;
        }
    });
    
    // Handle refund order button clicks
    $('.wpdd-refund-btn').on('click', function(e) {
        if (!confirm(wpdd_order_manager.confirm_refund)) {
            e.preventDefault();
            return false;
        }
    });
    
    // Handle release earnings button clicks
    $('.wpdd-release-btn').on('click', function(e) {
        if (!confirm(wpdd_order_manager.confirm_release)) {
            e.preventDefault();
            return false;
        }
    });
    
    // Auto-submit form when filter values change (optional convenience feature)
    $('#status, #creator').on('change', function() {
        // Uncomment the next line if you want auto-submit on filter change
        // $(this).closest('form').submit();
    });
});