"use strict";const t=require("../../../../common/vendor.js"),e=require("../common/util.js"),s=require("./types.js");Math||i();const i=()=>"../wd-icon/wd-icon.js",l=t.defineComponent({name:"wd-navbar",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:s.navbarProps,emits:["click-left","click-right"],setup(s,{emit:i}){const l=s,o=i,r=t.ref(""),{statusBarHeight:n}=t.index.getSystemInfoSync();t.watch([()=>l.fixed,()=>l.placeholder],(()=>{h()}),{deep:!0,immediate:!1});const a=t.computed((()=>{const t={};return l.fixed&&e.isDef(l.zIndex)&&(t["z-index"]=l.zIndex),l.safeAreaInsetTop&&(t["padding-top"]=e.addUnit(n||0)),`${e.objToStyle(t)}${l.customStyle}`}));function d(){l.leftDisabled||o("click-left")}function c(){l.rightDisabled||o("click-right")}t.onMounted((()=>{l.fixed&&l.placeholder&&t.nextTick$1((()=>{h()}))}));const{proxy:f}=t.getCurrentInstance();function h(){l.fixed&&l.placeholder&&e.getRect(".wd-navbar",!1,f).then((t=>{r.value=t.height}))}return(s,i)=>t.e({a:s.$slots.capsule},s.$slots.capsule?{}:s.$slots.left?{i:t.n("wd-navbar__left "+(s.leftDisabled?"is-disabled":"")),j:t.o(d)}:t.e({c:s.leftArrow},s.leftArrow?{d:t.p({name:"arrow-left","custom-class":"wd-navbar__arrow"})}:{},{e:s.leftText},s.leftText?{f:t.t(s.leftText)}:{},{g:t.n("wd-navbar__left "+(s.leftDisabled?"is-disabled":"")),h:t.o(d)}),{b:!s.$slots.left,k:!s.$slots.title&&s.title},!s.$slots.title&&s.title?{l:t.t(s.title)}:{},{m:s.$slots.right||s.rightText},s.$slots.right||s.rightText?t.e({n:!s.$slots.right&&s.rightText},!s.$slots.right&&s.rightText?{o:t.t(s.rightText)}:{},{p:t.n("wd-navbar__right "+(s.rightDisabled?"is-disabled":"")),q:t.o(c)}):{},{r:t.n(`wd-navbar ${s.customClass} ${s.fixed?"is-fixed":""} ${s.bordered?"is-border":""}`),s:t.s(a.value),t:t.unref(e.addUnit)(r.value)})}});wx.createComponent(l);
