import{u as k}from"./use-height.f6c2abd5.js";import{i as a,x as I,y as A,z as C,d as w,O as P,a9 as R,aV as s,aW as y,J as N,K as S}from"./index.afa1b71c.js";function b(e,l){const t=k(e);return i=>a("div",{class:l("placeholder"),style:{height:t.value?`${t.value}px`:void 0}},[i()])}const[O,r]=I("nav-bar"),z={title:String,fixed:Boolean,zIndex:A,border:C,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean};var E=w({name:O,props:z,emits:["click-left","click-right"],setup(e,{emit:l,slots:t}){const i=P(),o=b(i,r),f=n=>l("click-left",n),d=n=>l("click-right",n),h=()=>t.left?t.left():[e.leftArrow&&a(N,{class:r("arrow"),name:"arrow-left"},null),e.leftText&&a("span",{class:r("text")},[e.leftText])],u=()=>t.right?t.right():a("span",{class:r("text")},[e.rightText]),c=()=>{const{title:n,fixed:g,border:x,zIndex:v}=e,T=R(v),B=e.leftArrow||e.leftText||t.left,m=e.rightText||t.right;return a("div",{ref:i,style:T,class:[r({fixed:g}),{[y]:x,"van-safe-area-top":e.safeAreaInsetTop}]},[a("div",{class:r("content")},[B&&a("div",{class:[r("left"),s],onClick:f},[h()]),a("div",{class:[r("title"),"van-ellipsis"]},[t.title?t.title():n]),m&&a("div",{class:[r("right"),s],onClick:d},[u()])])])};return()=>e.fixed&&e.placeholder?o(c):c()}});const D=S(E);export{D as N};
