import $ from"./CWalxxGV.js";import b from"./CE4It_C4.js";import F from"./CAwng98-.js";import H from"./GQCWnG0A.js";import U from"./DaBytPEG.js";import{b as j,s as d,e as z,u as E,r as u,f,H as G,y as I,I as Z,h as J,i as y,w as g,P as K,j as t,l as r,m as a,T as O,A as Q,p as o,t as W,k as h,F as v,B as k}from"./BCLrUOBx.js";import{u as X}from"./CCot8u0_.js";import"./Dyp1qGEf.js";import"./CTAcmMAz.js";import"./B2sEaWda.js";import"./a5umXhxZ.js";import"./Bxmfm8sn.js";import"./BnLnKt_p.js";import"./Di7fl9dA.js";import"./Ce8lFovl.js";const Y={key:0,class:"spinner-wrapper flex"},ee={key:0,class:"info-msg"},te={key:1,class:"area"},ae={class:"area-content"},oe={class:"tile-container"},se={key:0,class:"shimmer-wrapper pt-15"},qe={__name:"compared",setup(ne){const l=j(),{getRequest:w}=l,{customScripts:re,site_setting:C}=d(l),{pageMeta:q}=X();z(q(C.value));const S=E(),{langCode:B}=d(S),n=u(!1),c=u(null),x=f(()=>{var e;return(e=c.value)==null?void 0:e.last_page}),i=f(()=>{var e;return(e=c.value)==null?void 0:e.data}),D=async()=>{await m()},_=u(null),P=async()=>{_.value.routeParam()},s=G(),{getTimeZone:T}=I(),m=async()=>{n.value=!0;const e=await w({params:`?${K({time_zone:T(),order_by:s.query.orderBy||"created_at",type:s.query.orderByType||"desc",page:s.query.page||1,q:s.query.q||null})}`,api:"compareListAll",lang:B.value});(e==null?void 0:e.status)===200&&(c.value=e.data),n.value=!1};return Z(()=>s.query,async()=>{await m()}),J(async()=>{await m()}),(e,ce)=>{const R=$,A=b,L=F,M=H,N=U;return t(),y(N,{"active-route":"compared",onClickedCompared:P,class:"flow-hidden"},{rightArea:g(()=>[r(O,{name:"fade",mode:"out-in"},{default:g(()=>[o(n)?(t(),a("div",Y,[r(R,{radius:100})])):Q("",!0)]),_:1}),o(i)&&!o(i).length?(t(),a("div",ee,W(e.$t("compared.noData")),1)):(t(),a("div",te,[h("div",ae,[h("div",oe,[o(n)?(t(),a("div",se,[(t(),a(v,null,k(8,p=>r(A,{key:p})),64))])):(t(!0),a(v,{key:1},k(o(i),(p,V)=>(t(),y(L,{key:V,product:p.product,onRemoved:D},null,8,["product"]))),128))])])])),r(M,{class:"mt-20 mt-sm-15",ref_key:"comparedPagination",ref:_,"total-page":o(x)},null,8,["total-page"])]),_:1})}}};export{qe as default};
