"use strict";const e=require("../../common/vendor.js"),t=require("../VerifyLogin.js");Math||n();const n=()=>"../../pages/NewAddedPk/NewAddedPk2.js",o={__name:"tabBar",props:{tabIndex:Number},setup(n){require.async("../../TUIKit/components/TUIConversation/entry.js");let o=e.ref(!1);const a=e.ref([]);let s=e.ref(0);function i(e){a.value=e,s.value=function(e){let t=0;for(const n of e){if(!n.hasOwnProperty("unreadCount"))return null;const e=n.unreadCount;if("number"!=typeof e||!Number.isFinite(e))return null;t+=e}return t}(e)}e.onMounted((()=>{e.Jt.watch(e.o.CONV,{conversationList:i})})),e.onUnmounted((()=>{e.Jt.unwatch(e.o.CONV,{conversationList:i})}));let c=e.reactive([{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Pk.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/PKClick.png",text:"PK",pagePath:"/pages/Home/Home",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Forum.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Forumclick.png",text:"论坛",pagePath:"/pages/Forum/Forum",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/jiahao.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/jiahao.png",text:"",pagePath:"/pages/c/c",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Message.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Messageclick.png",text:"消息"},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Mine.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Mineclick.png",text:"我的",pagePath:"/pages/Mine/Mine",middleClass:""}]);e.onMounted((()=>{!function(){let e=c.length;if(e%2){o.value=!0;let t=Math.floor(e/2);c[t].middleClass="mid-button"}}()})),e.index.getSystemInfo({success:function(e){e.safeArea.top}});const l=e.ref();const u=()=>!1;function h(n,o){3===o?t.VerifyLogin().then((t=>{t&&e.index.redirectTo({url:"/TUIKit/components/TUIConversation/index",animationType:"none"})})):2===o?t.VerifyLogin().then((e=>{e&&l.value.open()})):4===o?t.VerifyLogin().then((t=>{t&&e.index.switchTab({url:"/pages/Mine/Mine",animationType:"none"})})):e.index.switchTab({url:n.pagePath})}return(t,a)=>({a:e.f(e.unref(c),((t,o,a)=>e.e({a:n.tabIndex==o?t.selectedIconPath:t.iconPath,b:3===o&&e.unref(s)>0},3===o&&e.unref(s)>0?{c:e.t(e.unref(s)>99?"99+":e.unref(s))}:{},{d:e.t(t.text),e:n.tabIndex==o?"#1DD2F9":"#A7A3A3",f:e.n("list-item flex flex-column flex-middle "+t.middleClass),g:e.o$1((e=>h(t,o)),o),h:o}))),b:e.n(!0===e.unref(o)?"tab-list-middle":"tab-list-default"),c:e.o$1(u),d:e.sr(l,"31e8faa2-0",{k:"createModule"})})}},a=e._export_sfc(o,[["__scopeId","data-v-31e8faa2"]]);wx.createComponent(a);