import{_ as I}from"./vU4aS4uy.js";import{_ as V}from"./DuhDFJjj.js";import{a as D}from"./Z4eZ-m2s.js";import{O as P,j,d as c,w as _,m as o,o as a,b as t,c as d,t as n,F as f,g,G as z,H as U,K as E,f as F,J as H,e as M,E as O}from"./Bgmy51Qv.js";import{u as T}from"./BE7GDBwC.js";import{u as w}from"./CYl1ofbh.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const A={class:"lite-bold"},G={class:"mn-w-130x"},J=["value"],K={class:"mn-w-80x"},q={class:"mx-w-400x dply-felx j-left f-wrap"},Q=["onClick"],it={__name:"index",setup(W){const{t:r}=P(),h=j({user_id:{title:r("fSale.user")},created_at:{title:r("category.date")},rating:{title:r("fSale.rating")},product_id:{title:r("fSale.product")}}),k=e=>{var l,i;return e!=null&&e.user?(l=e==null?void 0:e.user)==null?void 0:l.name:e!=null&&e.guest_user?(i=e==null?void 0:e.guest_user)==null?void 0:i.name:""},{getThumbImageURL:y}=T(),{cbList:m,deleteBulk:b,listPageRef:$,setItemList:x,checkAll:p,deleteNode:L}=w();return(e,l)=>{const i=I,R=V,S=D;return a(),c(S,{ref_key:"listPageRef",ref:$,"list-api":"getRatingReviews","delete-api":"deleteRatingReview","route-name":"rating-reviews",name:e.$t("fSale.rr"),gate:"rating_review",class:"rating-review-wrapper","add-button":!1,"order-options":o(h),onDeleteBulk:o(b),onList:o(x)},{table:_(({list:B})=>[t("tr",A,[t("th",null,[t("input",{type:"checkbox",onChange:l[0]||(l[0]=(...s)=>o(p)&&o(p)(...s))},null,32)]),t("th",null,n(e.$t("fSale.user")),1),t("th",null,n(e.$t("fSale.rating")),1),t("th",null,n(e.$t("fSale.review")),1),t("th",G,n(e.$t("prod.pImgs")),1),t("th",null,n(e.$t("fSale.product")),1),t("th",null,n(e.$t("category.created")),1),l[2]||(l[2]=t("th",null," ",-1))]),(a(!0),d(f,null,g(B,(s,C)=>(a(),d("tr",{key:C},[t("td",null,[z(t("input",{type:"checkbox",value:s.id,"onUpdate:modelValue":l[1]||(l[1]=u=>U(m)?m.value=u:null)},null,8,J),[[E,o(m)]])]),t("td",null,[t("span",K,n(k(s)),1)]),t("td",null,[t("span",null,n(s.rating),1)]),t("td",null,[t("span",null,n(s.review),1)]),t("td",null,[t("span",q,[(a(!0),d(f,null,g(s.review_images,(u,N)=>(a(),c(i,{key:N,"lazy-src":o(y)(u.image),class:"m-5 img-80x"},null,8,["lazy-src"]))),128))])]),t("td",null,[F(R,{class:"ellipsis mx-w-200x link",to:`products/${s.product.id}`},{default:_(()=>[H(n(s.product.title),1)]),_:2},1032,["to"])]),t("td",null,n(s.created),1),t("td",null,[e.$can("rating_review","delete")?(a(),d("button",{key:0,onClick:O(u=>o(L)(s),["prevent"]),class:"delete-btn lite-btn"},n(e.$t("category.delete")),9,Q)):M("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])}}};export{it as default};
