"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js");getApp();const a={name:"navBar",data(){return{navH:e.inject("navHeight"),menuH:e.inject("menuHeight"),navBarStyle:"",backTitleStyle:"",navTitleStyle:"",titleColor:this.navTitleColor,bgColor:this.navBgColor,num:this.peopleNum}},props:{leftText:{type:String,default:""},backBlack:{type:Boolean,default:!1},navTitle:{type:String,default:""},navBgColor:{type:String,default:""},navTitleColor:{type:String,default:"white"},hideBack:{type:Boolean,default:!1},hideNavBg:{type:Boolean,default:!1},backLevel:{type:Number,default:1},peopleNum:{type:Number,default:0}},mounted(){let t=this.navH,a=e.inject("menuHeight"),l=e.inject("menuTop"),i=`background-color:${this.bgColor};height:${t}px;`,n=`height:${a}px;margin-top:${l}px;color:${this.titleColor}`,o=`height:${a}px;line-height:${a}px;top:${l}px;color:${this.titleColor}`;this.navBarStyle=i,this.backTitleStyle=n,this.navTitleStyle=o},watch:{navTitleColor:{handler(e,t){this.titleColor=e}},navBgColor:{handler(e,t){this.bgColor=e}},peopleNum:{handler(e,t){this.num=e}}},methods:{clickBack(){e.index.navigateBack({fail(){e.index.switchTab({url:"/pages/index/index"})}})}}};const l=e._export_sfc(a,[["render",function(a,l,i,n,o,r){return e.e({a:!i.hideNavBg},i.hideNavBg?{}:{b:t._imports_0},{c:!i.hideBack&&!i.backBlack},i.hideBack||i.backBlack?{}:{d:t._imports_1$10},{e:!i.hideBack&&i.backBlack},!i.hideBack&&i.backBlack?{f:t._imports_2}:{},{g:e.t(i.leftText),h:e.s(o.backTitleStyle),i:e.o(((...e)=>r.clickBack&&r.clickBack(...e))),j:e.t(i.navTitle),k:o.num>0},o.num>0?{l:e.t(o.num)}:{},{m:e.s(o.navTitleStyle),n:e.s(o.navBarStyle)})}]]);wx.createComponent(l);
