import b from"./CWalxxGV.js";import A from"./BnapQtOb.js";import $ from"./BBKeVCL1.js";import F from"./GQCWnG0A.js";import L from"./DaBytPEG.js";import{b as M,s as N,e as V,r as u,f as g,H as j,y as H,I as U,h as z,i as y,w as m,P as E,j as e,l as s,m as n,T as G,A as I,p as a,t as Z,k as w,F as J,B as K}from"./BCLrUOBx.js";import{u as O}from"./CCot8u0_.js";import"./Bvs3L9q-.js";import"./zH0z38ay.js";import"./Bxmfm8sn.js";const Q={key:0,class:"spinner-wrapper flex"},W={key:0,class:"info-msg"},X={key:1,class:"area"},Y={class:"area-content user-following"},tt={class:"tile-container"},dt={__name:"following",setup(et){const _=M(),{getRequest:h}=_,{customScripts:ot,site_setting:v}=N(_),{pageMeta:k}=O();V(k(v.value));const r=u(!1),i=u(null),q=g(()=>{var t;return(t=i.value)==null?void 0:t.last_page}),c=g(()=>{var t;return(t=i.value)==null?void 0:t.data}),p=async()=>{await l()},d=u(null),B=()=>{d.value.routeParam()},o=j(),{getTimeZone:x}=H(),l=async()=>{r.value=!0;const t=await h({params:`?${E({time_zone:x(),order_by:o.query.orderBy||"created_at",type:o.query.orderByType||"desc",page:o.query.page||1,q:o.query.q||null})}`,api:"followingListAll"});(t==null?void 0:t.status)===200&&(i.value=t.data),r.value=!1};return U(()=>o.query,async()=>{await l()}),z(async()=>{await l()}),(t,at)=>{const C=b,D=A,R=$,S=F,P=L;return e(),y(P,{"active-route":"following",onClickedCompared:B,class:"flow-hidden"},{rightArea:m(()=>[s(G,{name:"fade",mode:"out-in"},{default:m(()=>[a(r)?(e(),n("div",Q,[s(C,{radius:100})])):I("",!0)]),_:1}),a(c)&&!a(c).length?(e(),n("div",W,Z(t.$t("store.noData")),1)):(e(),n("div",X,[w("div",Y,[w("div",tt,[(e(!0),n(J,null,K(a(c),(f,T)=>(e(),y(R,{key:`store-tile-${T}`,store:f.store,onRemoved:p},{followBtn:m(()=>[s(D,{color:"primary",class:"visit-btn",following:!0,"store-id":f.store.id,onChangeFollowing:p},null,8,["store-id"])]),_:2},1032,["store"]))),128))])])])),s(S,{class:"mt-20 mt-sm-15",ref_key:"followingPaginationRef",ref:d,"total-page":a(q)},null,8,["total-page"])]),_:1})}}};export{dt as default};
