"use strict";const e=require("../../../common/vendor.js"),r=require("../../helper/index.js"),t=require("../../index.js");require("../../helper/test.js"),require("../../helper/digit.js"),require("../../url/index.js"),require("../../store/index.js"),require("../../store/app.js"),require("../../api/promotion/diy.js"),require("../../request/index.js"),require("../../config/index.js"),require("../../platform/index.js"),require("../../platform/provider/wechat/index.js"),require("../../platform/provider/wechat/miniProgram.js"),require("../../api/member/auth.js"),require("../../api/member/social.js"),require("../../api/member/user.js"),require("../../platform/provider/apple/index.js"),require("../../platform/share.js"),require("../../router/index.js"),require("../../hooks/useModal.js"),require("../../api/member/signin.js"),require("../../helper/throttle.js"),require("../../platform/pay.js"),require("../../api/pay/order.js"),require("../../store/user.js"),require("../../store/cart.js"),require("../../api/trade/cart.js"),require("../../api/pay/wallet.js"),require("../../api/trade/order.js"),require("../../api/promotion/coupon.js"),require("../../store/sys.js"),require("../../store/modal.js"),require("../../config/zIndex.js");const i={name:"su-tabbar",props:{customStyle:{type:[Object,String],default:()=>({})},customClass:{type:String,default:""},url:{type:String,default:""},linkType:{type:String,default:"navigateTo"},value:{type:[String,Number,null],default:""},safeAreaInsetBottom:{type:Boolean,default:!0},border:{type:Boolean,default:!0},zIndex:{type:[String,Number],default:10},activeColor:{type:String,default:"#1989fa"},inactiveColor:{type:String,default:"#7d7e80"},fixed:{type:Boolean,default:!0},placeholder:{type:Boolean,default:!0},midTabBar:{type:Boolean,default:!1}},data:()=>({placeholderHeight:0,safeBottomHeight:t.sheep.$platform.device.safeAreaInsets.bottom}),computed:{tabbarStyle(){const e={zIndex:this.zIndex};return r.deepMerge(e,r.addStyle(this.customStyle))},updateChild(){return[this.value,this.activeColor,this.inactiveColor]},updatePlaceholder(){return[this.fixed,this.placeholder]}},watch:{updateChild(){this.updateChildren()},updatePlaceholder(){this.setPlaceholderHeight()}},created(){this.children=[]},mounted(){this.setPlaceholderHeight()},methods:{updateChildren(){this.children.length&&this.children.map((e=>e.updateFromParent()))},getRect(r,t){return new Promise((i=>{e.index.createSelectorQuery().in(this)[t?"selectAll":"select"](r).boundingClientRect((e=>{t&&Array.isArray(e)&&e.length&&i(e),!t&&e&&i(e)})).exec()}))},async setPlaceholderHeight(){this.fixed&&this.placeholder&&(await r.sleep(20),this.getRect(".u-tabbar__content").then((({height:e=50})=>{this.placeholderHeight=e})))}}};const a=e._export_sfc(i,[["render",function(r,t,i,a,o,s){return e.e({a:i.safeAreaInsetBottom},i.safeAreaInsetBottom?{b:e.s({height:o.safeBottomHeight+"px"})}:{},{c:e.o((()=>{})),d:e.n(i.border&&"u-border-top"),e:e.n(i.fixed&&"u-tabbar--fixed"),f:e.n({"mid-tabbar":i.midTabBar}),g:e.s(s.tabbarStyle),h:i.placeholder},i.placeholder?{i:o.placeholderHeight+"px"}:{})}],["__scopeId","data-v-cc8282eb"]]);wx.createComponent(a);
