import{c as D,aS as m,n as I,D as s,aT as R,aP as d,at as w,t as A,w as C}from"./index-ae60edf9.js";import{d as P,b as S,$ as l}from"./@vue-cb50a1c4.js";const[L,t]=D("nav-bar"),N={title:String,fixed:Boolean,zIndex:I,border:s,leftText:String,rightText:String,leftDisabled:Boolean,rightDisabled:Boolean,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:s};var y=P({name:L,props:N,emits:["clickLeft","clickRight"],setup(e,{emit:n,slots:a}){const r=S(),f=m(r,t),o=i=>{e.leftDisabled||n("clickLeft",i)},h=i=>{e.rightDisabled||n("clickRight",i)},g=()=>a.left?a.left():[e.leftArrow&&l(A,{class:t("arrow"),name:"arrow-left"},null),e.leftText&&l("span",{class:t("text")},[e.leftText])],b=()=>a.right?a.right():l("span",{class:t("text")},[e.rightText]),c=()=>{const{title:i,fixed:x,border:u,zIndex:v}=e,B=R(v),T=e.leftArrow||e.leftText||a.left,k=e.rightText||a.right;return l("div",{ref:r,style:B,class:[t({fixed:x}),{[w]:u,"van-safe-area-top":e.safeAreaInsetTop}]},[l("div",{class:t("content")},[T&&l("div",{class:[t("left",{disabled:e.leftDisabled}),e.clickable&&!e.leftDisabled?d:""],onClick:o},[g()]),l("div",{class:[t("title"),"van-ellipsis"]},[a.title?a.title():i]),k&&l("div",{class:[t("right",{disabled:e.rightDisabled}),e.clickable&&!e.rightDisabled?d:""],onClick:h},[b()])])])};return()=>e.fixed&&e.placeholder?f(c):c()}});const _=C(y);export{_ as N};
