import{ak as t,az as e,J as a,q as l,o as i,c as s,w as n,t as o,G as r,R as u,v as c,x as d,A as h,a2 as b,i as f}from"./index-DL8B2Mxu.js";import{_ as p}from"./u-icon.CLOPtL2B.js";import{r as y}from"./uni-app.es.BSVEa1f2.js";import{_ as g}from"./_plugin-vue_export-helper.BCo6x5W8.js";let m=t(),k={};const x=g({name:"u-navbar",props:{height:{type:[String,Number],default:""},backIconColor:{type:String,default:"#606266"},backIconName:{type:String,default:"nav-back"},backIconSize:{type:[String,Number],default:"44"},backText:{type:String,default:""},backTextStyle:{type:Object,default:()=>({color:"#606266"})},title:{type:String,default:""},titleWidth:{type:[String,Number],default:"250"},titleColor:{type:String,default:"#606266"},titleBold:{type:Boolean,default:!1},titleSize:{type:[String,Number],default:32},isBack:{type:[Boolean,String],default:!0},background:{type:Object,default:()=>({background:"#ffffff"})},isFixed:{type:Boolean,default:!0},immersive:{type:Boolean,default:!1},borderBottom:{type:Boolean,default:!0},zIndex:{type:[String,Number],default:""},customBack:{type:Function,default:null}},data:()=>({menuButtonInfo:k,statusBarHeight:m.statusBarHeight}),computed:{navbarInnerStyle(){let t={};return t.height=this.navbarHeight+"px",t},navbarStyle(){let t={};return t.zIndex=this.zIndex?this.zIndex:this.$u.zIndex.navbar,Object.assign(t,this.background),t},titleStyle(){let t={};return t.left=(m.windowWidth-e(this.titleWidth))/2+"px",t.right=(m.windowWidth-e(this.titleWidth))/2+"px",t.width=e(this.titleWidth)+"px",t},navbarHeight(){return this.height?this.height:44}},created(){},methods:{goBack(){"function"==typeof this.customBack?this.customBack.bind(this.$u.$parent.call(this))():a()}}},[["render",function(t,e,a,g,m,k){const x=f,S=y(l("u-icon"),p);return i(),s(x,{class:""},{default:n((()=>[o(x,{class:r(["u-navbar",{"u-navbar-fixed":a.isFixed,"u-border-bottom":a.borderBottom}]),style:u([k.navbarStyle])},{default:n((()=>[o(x,{class:"u-status-bar",style:u({height:m.statusBarHeight+"px"})},null,8,["style"]),o(x,{class:"u-navbar-inner",style:u([k.navbarInnerStyle])},{default:n((()=>[a.isBack?(i(),s(x,{key:0,class:"u-back-wrap",onClick:k.goBack},{default:n((()=>[o(x,{class:"u-icon-wrap"},{default:n((()=>[o(S,{name:a.backIconName,color:a.backIconColor,size:a.backIconSize},null,8,["name","color","size"])])),_:1}),a.backText?(i(),s(x,{key:0,class:"u-icon-wrap u-back-text u-line-1",style:u([a.backTextStyle])},{default:n((()=>[c(d(a.backText),1)])),_:1},8,["style"])):h("",!0)])),_:1},8,["onClick"])):h("",!0),a.title?(i(),s(x,{key:1,class:"u-navbar-content-title",style:u([k.titleStyle])},{default:n((()=>[o(x,{class:"u-title u-line-1",style:u({color:a.titleColor,fontSize:a.titleSize+"rpx",fontWeight:a.titleBold?"bold":"normal"})},{default:n((()=>[c(d(a.title),1)])),_:1},8,["style"])])),_:1},8,["style"])):h("",!0),o(x,{class:"u-slot-content"},{default:n((()=>[b(t.$slots,"default",{},void 0,!0)])),_:3}),o(x,{class:"u-slot-right"},{default:n((()=>[b(t.$slots,"right",{},void 0,!0)])),_:3})])),_:3},8,["style"])])),_:3},8,["style","class"]),a.isFixed&&!a.immersive?(i(),s(x,{key:0,class:"u-navbar-placeholder",style:u({width:"100%",height:Number(k.navbarHeight)+m.statusBarHeight+"px"})},null,8,["style"])):h("",!0)])),_:3})}],["__scopeId","data-v-0c2a657a"]]);export{x as _};
