import{P as t}from"./ProductMixin-D4Z8_OKx-v4.7.9.js";import"./ProductRating-Jsih_aOL-v4.7.9.js";import"./Pagination-DKj6Zlmg-v4.7.9.js";Alpine.data("ReviewItem",e=>({...t(e)}));Alpine.data("Reviews",()=>({fetchingReviews:!1,reviews:{data:[]},currentPage:1,get reviewIsEmpty(){return this.reviews.data.length===0},get totalPage(){return Math.ceil(this.reviews.total/10)},init(){this.fetchReviews()},changePage(e){this.currentPage=e,this.fetchReviews()},async fetchReviews(){this.fetchingReviews=!0;try{const e=await axios.get(`/reviews/products?page=${this.currentPage}`);this.reviews=e.data}catch(e){notify(e.response.data.message)}finally{this.fetchingReviews=!1}}}));
