"use strict";const e=require("../../../common/vendor.js"),a=require("../../../common/libraries/apiLoading.js"),o=require("../../../gen/Apis.js");require("../../../common/libraries/request.js");const t=require("../../../common/store/useWeAppAuthStore.js");require("../../../common/store/useWorkStore.js");const l=require("../../../common/libraries/getPageConfig.js"),s=require("../../../common/libraries/userUserLogin.js");if(require("../../../common/libraries/setTabBar.js"),!Array){e.resolveComponent("cc-scroll-loading")()}Math||(n+r+(()=>"../../../common/components/cc-scroll-loading/cc-scroll-loading.js"))();const r=()=>"./ConvenienceServices.js",n=()=>"./EventList.js",i=e.defineComponent({__name:"Tabs",setup(r){const n=e.ref(!1),i=e.ref({page:1}),u=e.ref({}),c=t.useWeAppAuthStore(),v=[{label:"社区活动"},{label:"便民服务"}],d=e.ref(0),p=e.ref([]),m=e=>{d.value=e,p.value=[],d.value?_("PropertyExclusive"):g()},g=()=>{var e,t;a.getApiLoading(o.Apis.Activity.Activities.List,{...i.value,asset_projects_id:(null==(t=null==(e=null==c?void 0:c.data)?void 0:e.selected_house)?void 0:t.asset_projects_id)||-1}).then((e=>{n.value=!0,p.value=[...p.value,...e.data||[]],u.value=e.meta,console.log("res",e)}))},_=e=>{var t,l;a.getApiLoading(o.Apis.Common.ConvenienceServices.List,{asset_projects_id:(null==(l=null==(t=null==c?void 0:c.data)?void 0:t.selected_house)?void 0:l.asset_projects_id)||-1,type:e}).then((e=>{n.value=!0,p.value=e.data,u.value=e.meta,console.log(e)}))},b=e=>{i.value.page=e,m(d.value)};return e.watch((()=>{var e;return null==(e=null==c?void 0:c.data)?void 0:e.selected_house}),(()=>{var e;(null==(e=s.getUserLogin)?void 0:e.getLoginStatus())&&n.value&&m(d.value)}),{deep:!0}),e.onMounted((async()=>{var a;await(null==(a=e.getCurrentInstance())?void 0:a.appContext.config.globalProperties.$onLaunched),g()})),(a,o)=>e.e({a:e.f(v,((a,o,t)=>e.e({a:e.t(null==a?void 0:a.label),b:o===d.value},o===d.value?{c:e.s(e.unref(l.getStyleBgInfo)())}:{},{d:`tab_${o}`,e:e.n("tab_item "+(o===d.value?"tab_active":"")),f:e.o((e=>m(o)),`tab_${o}`)}))),b:0===d.value},0===d.value?{c:e.p({data:p.value})}:{},{d:1===d.value},1===d.value?{e:e.o(_),f:e.p({data:p.value})}:{},{g:e.o(b),h:e.p({meta:u.value})})}}),u=e._export_sfc(i,[["__scopeId","data-v-1c2952d7"]]);wx.createComponent(u);
