var x=Object.defineProperty,z=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var w=(t,s,a)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,u=(t,s)=>{for(var a in s||(s={}))P.call(s,a)&&w(t,a,s[a]);if(k)for(var a of k(s))A.call(s,a)&&w(t,a,s[a]);return t},h=(t,s)=>z(t,B(s));import{b as H,c as d,a as N,d as V,r as j,s as F,w as G,e as L,al as M,a4 as R,am as $,ag as q,b9 as E,ab as J,ah as U,f as i,o,g as r,h as b,j as K,n as C,a2 as f,J as n,k as c,_ as O,L as p,M as g,G as Q,H as W,F as X,q as Y}from"./index-C8qz7c0N.js";const Z=h(u({},H),{title:String,leftText:String,rightText:String,leftArrow:d(!1),bordered:d(!0),fixed:d(!1),placeholder:d(!1),zIndex:N(500),safeAreaInsetTop:d(!1),leftDisabled:d(!1),rightDisabled:d(!1)}),ee={name:"wd-navbar",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"}},ae=V(h(u({},ee),{props:Z,emits:["click-left","click-right"],setup(t,{emit:s}){const a=t,_=s,m=j(""),{statusBarHeight:T}=F();G([()=>a.fixed,()=>a.placeholder],()=>{y()},{deep:!0,immediate:!1});const S=L(()=>{const e={};return a.fixed&&M(a.zIndex)&&(e["z-index"]=a.zIndex),a.safeAreaInsetTop&&(e["padding-top"]=$(T||0)),`${R(e)}${a.customStyle}`});q(()=>{a.fixed&&a.placeholder&&E(()=>{y()})});function v(){a.leftDisabled||_("click-left")}function D(){a.rightDisabled||_("click-right")}const{proxy:I}=J();function y(){!a.fixed||!a.placeholder||U(".wd-navbar",!1,I).then(e=>{m.value=e.height})}return(e,se)=>{const l=K;return o(),i(l,{style:C({height:X($)(m.value)})},{default:r(()=>[b(l,{class:f(`wd-navbar ${e.customClass} ${e.fixed?"is-fixed":""} ${e.bordered?"is-border":""}`),style:C(S.value)},{default:r(()=>[b(l,{class:"wd-navbar__content"},{default:r(()=>[e.$slots.capsule?(o(),i(l,{key:0,class:"wd-navbar__capsule"},{default:r(()=>[c(e.$slots,"capsule",{},void 0,!0)]),_:3})):e.$slots.left?(o(),i(l,{key:2,class:f(`wd-navbar__left ${e.leftDisabled?"is-disabled":""}`),onClick:v},{default:r(()=>[c(e.$slots,"left",{},void 0,!0)]),_:3},8,["class"])):(o(),i(l,{key:1,class:f(`wd-navbar__left ${e.leftDisabled?"is-disabled":""}`),onClick:v},{default:r(()=>[e.leftArrow?(o(),i(O,{key:0,name:"arrow-left","custom-class":"wd-navbar__arrow"})):n("",!0),e.leftText?(o(),i(l,{key:1,class:"wd-navbar__text"},{default:r(()=>[p(g(e.leftText),1)]),_:1})):n("",!0)]),_:1},8,["class"])),b(l,{class:"wd-navbar__title"},{default:r(()=>[c(e.$slots,"title",{},void 0,!0),!e.$slots.title&&e.title?(o(),Q(W,{key:0},[p(g(e.title),1)],64)):n("",!0)]),_:3}),e.$slots.right||e.rightText?(o(),i(l,{key:3,class:f(`wd-navbar__right ${e.rightDisabled?"is-disabled":""}`),onClick:D},{default:r(()=>[c(e.$slots,"right",{},void 0,!0),!e.$slots.right&&e.rightText?(o(),i(l,{key:0,class:"wd-navbar__text","hover-class":"wd-navbar__text--hover","hover-stay-time":70},{default:r(()=>[p(g(e.rightText),1)]),_:1})):n("",!0)]),_:3},8,["class"])):n("",!0)]),_:3})]),_:3},8,["class","style"])]),_:3},8,["style"])}}})),re=Y(ae,[["__scopeId","data-v-dd43dd1f"]]);export{re as _};
