import{u as k}from"./use-height.c83159bc.js";import{i as a,E as I,G as A,H as C,d as w,U as N,ae as P,aY as s,aZ as R,N as S,O as b}from"./index.6b776f4b.js";function y(e,l){const t=k(e);return i=>a("div",{class:l("placeholder"),style:{height:t.value?`${t.value}px`:void 0}},[i()])}const[E,r]=I("nav-bar"),O={title:String,fixed:Boolean,zIndex:A,border:C,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean};var H=w({name:E,props:O,emits:["click-left","click-right"],setup(e,{emit:l,slots:t}){const i=N(),o=y(i,r),f=n=>l("click-left",n),d=n=>l("click-right",n),h=()=>t.left?t.left():[e.leftArrow&&a(S,{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:v,zIndex:x}=e,T=P(x),B=e.leftArrow||e.leftText||t.left,m=e.rightText||t.right;return a("div",{ref:i,style:T,class:[r({fixed:g}),{[R]:v,"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 z=b(H);export{z as N};