/*! DO NOT EDIT THIS FILE. This file is a auto generated on 2023-03-25 */
jQuery(document).ready(function(r){$reviews_vendor="",$review_product="",$wcfm_reviews_table=r("#wcfm-reviews").DataTable({processing:!0,serverSide:!0,pageLength:parseInt(dataTables_config.pageLength),bFilter:!1,responsive:!0,language:r.parseJSON(dataTables_language),columns:[{responsivePriority:1},{responsivePriority:5},{responsivePriority:2},{responsivePriority:1},{responsivePriority:3},{responsivePriority:4},{responsivePriority:6},{responsivePriority:1}],columnDefs:[{targets:0,orderable:!1},{targets:1,orderable:!1},{targets:2,orderable:!1},{targets:3,orderable:!1},{targets:4,orderable:!1},{targets:5,orderable:!1},{targets:6,orderable:!1},{targets:7,orderable:!1}],ajax:{type:"POST",url:wcfm_params.ajax_url,data:function(e){e.action="wcfm_ajax_controller",e.controller="wcfm-product-reviews",e.reviews_vendor=$reviews_vendor,e.review_product=$review_product,e.status_type=GetURLParameter("reviews_status"),e.wcfm_ajax_nonce=wcfm_params.wcfm_ajax_nonce},complete:function(){initiateTip(),r(document.body).trigger("updated_wcfm-reviews")}}}),r(document.body).on("updated_wcfm-reviews",function(){r(".wcfm_review_status_update").each(function(){r(this).click(function(e){e.preventDefault();e=confirm(wcfm_dashboard_messages.review_status_update_confirm);if(e){e=r(this);jQuery("#wcfm-reviews_wrapper").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e={action:"wcfmmp_product_reviews_status_update",reviewid:e.data("reviewid"),status:e.data("status"),wcfm_ajax_nonce:wcfm_params.wcfm_ajax_nonce},jQuery.ajax({type:"POST",url:wcfm_params.ajax_url,data:e,success:function(e){$wcfm_reviews_table&&$wcfm_reviews_table.ajax.reload(),jQuery("#wcfm-reviews_wrapper").unblock()}})}return!1})})}),r(document.body).on("updated_wcfm-reviews",function(){r(".wcfm_review_dalete").each(function(){r(this).click(function(e){e.preventDefault();e=confirm(wcfm_dashboard_messages.review_status_update_confirm);if(e){e=r(this);jQuery("#wcfm-reviews_wrapper").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e={action:"wcfmmp_product_reviews_status_update",reviewid:e.data("reviewid"),wcfm_ajax_nonce:wcfm_params.wcfm_ajax_nonce,status:2},jQuery.ajax({type:"POST",url:wcfm_params.ajax_url,data:e,success:function(e){$wcfm_reviews_table&&$wcfm_reviews_table.ajax.reload(),jQuery("#wcfm-reviews_wrapper").unblock()}})}return!1})})}),0<r("#review_product").length&&r("#review_product").on("change",function(){$review_product=r("#review_product").val(),$wcfm_reviews_table.ajax.reload()}).select2($wcfm_product_select_args),0<r("#dropdown_vendor").length&&r("#dropdown_vendor").on("change",function(){$reviews_vendor=r("#dropdown_vendor").val(),$wcfm_reviews_table.ajax.reload()}).select2($wcfm_vendor_select_args),0<r(".wcfm_filters_wrap").length&&(r(".dataTable").before(r(".wcfm_filters_wrap")),r(".wcfm_filters_wrap").css("display","inline-block")),r(document.body).on("updated_wcfm-reviews",function(){r.each(wcfm_reviews_screen_manage,function(e,r){$wcfm_reviews_table.column(e).visible(!1)})})});