import{G as t,H as e,ay as s,g as a,o,c as l,w as r,A as i,m as n,a as u,n as c,j as g,h as _,t as d,d as h,i as v,K as b}from"./index-d76b1e7a.js";import{_ as f}from"./uv-status-bar.66ab7702.js";import{r as m}from"./useRouter.2bdb47a0.js";import{_ as C}from"./uv-icon.5730d4d2.js";import{p as y}from"./uv-navbar.vue_vue_type_style_index_0_scoped_8d8b32e4_lang.3fde2b65.js";import{_ as p}from"./_plugin-vue_export-helper.1b428a4d.js";const x=p({name:"uv-navbar",mixins:[t,e,y],data:()=>({}),computed:{getBgColor(){const t={};return this.bgColor&&(this.bgColor.indexOf("gradient")>-1?t.backgroundImage=this.bgColor:this.isImg?t.background="transparent":t.background=this.bgColor),t},getStatusbgColor(){if(this.bgColor)return this.isImg?"transparent":this.bgColor},isImg(){const t=this.bgColor.indexOf("data:")>-1&&this.bgColor.indexOf("base64")>-1;return-1!==this.bgColor.indexOf("/")||t},bgImgStyle(){const t={};return this.safeAreaInsetTop?t.height=this.$uv.addUnit(this.$uv.sys().statusBarHeight+44,"px"):t.height="44px",t}},methods:{leftClick(){this.$emit("leftClick"),this.autoBack&&s()},rightClick(){this.$emit("rightClick")}}},[["render",function(t,e,s,y,p,x){const k=h,I=v,$=m(a("uv-status-bar"),f),j=m(a("uv-icon"),C),S=b;return o(),l(k,{class:"uv-navbar"},{default:r((()=>[t.fixed&&t.placeholder?(o(),l(k,{key:0,class:"uv-navbar__placeholder",style:i({height:t.$uv.addUnit(t.$uv.getPx(t.height)+t.$uv.sys().statusBarHeight,"px")})},null,8,["style"])):n("",!0),u(k,{class:c([t.fixed&&"uv-navbar--fixed"])},{default:r((()=>[x.isImg?(o(),l(I,{key:0,class:"uv-navbar--bgimg",src:t.bgColor,mode:t.imgMode,style:i([x.bgImgStyle])},null,8,["src","mode","style"])):n("",!0),t.safeAreaInsetTop?(o(),l($,{key:1,bgColor:x.getStatusbgColor},null,8,["bgColor"])):n("",!0),u(k,{class:c(["uv-navbar__content",[t.border&&"uv-border-bottom"]]),style:i([{height:t.$uv.addUnit(t.height)},x.getBgColor])},{default:r((()=>[u(k,{class:"uv-navbar__content__left","hover-class":"uv-navbar__content__left--hover","hover-start-time":"150",onClick:x.leftClick},{default:r((()=>[g(t.$slots,"left",{},(()=>[t.leftIcon?(o(),l(j,{key:0,name:t.leftIcon,size:t.leftIconSize,color:t.leftIconColor},null,8,["name","size","color"])):n("",!0),t.leftText?(o(),l(S,{key:1,style:i({color:t.leftIconColor}),class:"uv-navbar__content__left__text"},{default:r((()=>[_(d(t.leftText),1)])),_:1},8,["style"])):n("",!0)]),!0)])),_:3},8,["onClick"]),g(t.$slots,"center",{},(()=>[u(S,{class:"uv-line-1 uv-navbar__content__title",style:i([{width:t.$uv.addUnit(t.titleWidth),flex:"0 1 auto"},t.$uv.addStyle(t.titleStyle)])},{default:r((()=>[_(d(t.title),1)])),_:1},8,["style"])]),!0),u(k,{class:"uv-navbar__content__right",onClick:x.rightClick},{default:r((()=>[g(t.$slots,"right",{},(()=>[t.rightIcon?(o(),l(j,{key:0,name:t.rightIcon,size:"20"},null,8,["name"])):n("",!0),t.rightText?(o(),l(S,{key:1,class:"uv-navbar__content__right__text"},{default:r((()=>[_(d(t.rightText),1)])),_:1})):n("",!0)]),!0)])),_:3},8,["onClick"])])),_:3},8,["class","style"])])),_:3},8,["class"])])),_:3})}],["__scopeId","data-v-8d8b32e4"]]);export{x as _};
