import{Y as t,Z as e,b2 as s,G as a,H as l,o,j as r,w as i,y as n,z as c,h as u,m as g,a0 as _,I as h,l as d,B as v,p as b,A as f}from"./index-90c12cc1.js";import{_ as m}from"./uv-status-bar.acda7a2c.js";import{_ as C}from"./uv-icon.c815b875.js";import{p as y}from"./uv-navbar.vue_vue_type_style_index_0_scoped_4c301e25_lang.553ed1e6.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=v,I=b,$=a(l("uv-status-bar"),m),S=a(l("uv-icon"),C),j=f;return o(),r(k,{class:"uv-navbar"},{default:i((()=>[t.fixed&&t.placeholder?(o(),r(k,{key:0,class:"uv-navbar__placeholder",style:n({height:t.$uv.addUnit(t.$uv.getPx(t.height)+t.$uv.sys().statusBarHeight,"px")})},null,8,["style"])):c("",!0),u(k,{class:g([t.fixed&&"uv-navbar--fixed"])},{default:i((()=>[x.isImg?(o(),r(I,{key:0,class:"uv-navbar--bgimg",src:t.bgColor,mode:t.imgMode,style:n([x.bgImgStyle])},null,8,["src","mode","style"])):c("",!0),t.safeAreaInsetTop?(o(),r($,{key:1,bgColor:x.getStatusbgColor},null,8,["bgColor"])):c("",!0),u(k,{class:g(["uv-navbar__content",[t.border&&"uv-border-bottom"]]),style:n([{height:t.$uv.addUnit(t.height)},x.getBgColor])},{default:i((()=>[u(k,{class:"uv-navbar__content__left","hover-class":"uv-navbar__content__left--hover","hover-start-time":"150",onClick:x.leftClick},{default:i((()=>[_(t.$slots,"left",{},(()=>[t.leftIcon?(o(),r(S,{key:0,name:t.leftIcon,size:t.leftIconSize,color:t.leftIconColor},null,8,["name","size","color"])):c("",!0),t.leftText?(o(),r(j,{key:1,style:n({color:t.leftIconColor}),class:"uv-navbar__content__left__text"},{default:i((()=>[h(d(t.leftText),1)])),_:1},8,["style"])):c("",!0)]),!0)])),_:3},8,["onClick"]),_(t.$slots,"center",{},(()=>[u(j,{class:"uv-line-1 uv-navbar__content__title",style:n([{width:t.$uv.addUnit(t.titleWidth),flex:"0 1 auto"},t.$uv.addStyle(t.titleStyle)])},{default:i((()=>[h(d(t.title),1)])),_:1},8,["style"])]),!0),u(k,{class:"uv-navbar__content__right",onClick:x.rightClick},{default:i((()=>[_(t.$slots,"right",{},(()=>[t.rightIcon?(o(),r(S,{key:0,name:t.rightIcon,size:"20"},null,8,["name"])):c("",!0),t.rightText?(o(),r(j,{key:1,class:"uv-navbar__content__right__text"},{default:i((()=>[h(d(t.rightText),1)])),_:1})):c("",!0)]),!0)])),_:3},8,["onClick"])])),_:3},8,["class","style"])])),_:3},8,["class"])])),_:3})}],["__scopeId","data-v-4c301e25"]]);export{x as _};
