').select2({placeholder:"United States ",dropdownParent:o.parent()}),n.length&&(e=n.DataTable({ajax:assetsPath+"json/ecommerce-customer-all.json",columns:[{data:""},{data:"id"},{data:"customer"},{data:"customer_id"},{data:"country"},{data:"order"},{data:"total_spent"}],columnDefs:[{className:"control",searchable:!1,orderable:!1,responsivePriority:2,targets:0,render:function(e,t,s,a){return""}},{targets:1,orderable:!1,searchable:!1,responsivePriority:3,checkboxes:!0,checkboxes:{selectAllRender:''},render:function(){return''}},{targets:2,responsivePriority:1,render:function(e,t,s,a){var n=s.customer,o=s.email,r=s.image;return'
').append(s)}}}}),$(".dataTables_length").addClass("mt-0 mt-md-3 me-2"),$(".dt-action-buttons").addClass("pt-0"),$(".dt-buttons > .btn-group > button").removeClass("btn-secondary"),$(".dt-buttons").addClass("d-flex flex-wrap")),$(".datatables-customers tbody").on("click",".delete-record",function(){e.row($(this).parents("tr")).remove().draw()}),setTimeout(()=>{$(".dataTables_filter .form-control").removeClass("form-control-sm"),$(".dataTables_length .form-select").removeClass("form-select-sm")},300)}),function(){var e=document.querySelectorAll(".phone-mask"),t=document.getElementById("eCommerceCustomerAddForm");e&&e.forEach(function(e){new Cleave(e,{phone:!0,phoneRegionCode:"US"})}),FormValidation.formValidation(t,{fields:{customerName:{validators:{notEmpty:{message:"Please enter fullname "}}},customerEmail:{validators:{notEmpty:{message:"Please enter your email"},emailAddress:{message:"The value is not a valid email address"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap5:new FormValidation.plugins.Bootstrap5({eleValidClass:"",rowSelector:function(e,t){return".mb-3"}}),submitButton:new FormValidation.plugins.SubmitButton,autoFocus:new FormValidation.plugins.AutoFocus}})}();