import{u as y,m as T,a as V}from"./tag-Dx3OexMp.js";import{v as k,x as C,a,a6 as _,J as B,e as l,aq as D,ah as q,ab as w,h as x,Y as z,C as A,a7 as n}from"./index-CTxlYqj4.js";import{C as F,r as J,u as U,b as Y,s as $,A as j,p as G,h as c,q as K}from"./VAvatar-x_79C0tA.js";import{u as L}from"./VProgressCircular-ubzZW5PC.js";const M=C({text:String,...V(),...T()},"VToolbarTitle"),O=k()({name:"VToolbarTitle",props:M(),setup(e,s){let{slots:t}=s;return y(()=>{const i=!!(t.default||t.text||e.text);return a(e.tag,{class:B(["v-toolbar-title",e.class]),style:_(e.style)},{default:()=>{var o;return[i&&l("div",{class:"v-toolbar-title__placeholder"},[t.text?t.text():e.text,(o=t.default)==null?void 0:o.call(t)])]}})}),{}}}),Q=[null,"prominent","default","comfortable","compact"],W=C({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>Q.includes(e)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...j(),...V(),...$(),...Y(),...T({tag:"header"}),...A()},"VToolbar"),te=k()({name:"VToolbar",props:W(),setup(e,s){var m;let{slots:t}=s;const{backgroundColorClasses:i,backgroundColorStyles:o}=L(()=>e.color),{borderClasses:P}=F(e),{elevationClasses:S}=J(e),{roundedClasses:N}=U(e),{themeClasses:H}=D(e),{rtlClasses:I}=q(),r=w(!!(e.extended||(m=t.extension)!=null&&m.call(t))),d=x(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),u=x(()=>r.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return z({VBtn:{variant:"text"}}),y(()=>{var v;const R=!!(e.title||t.title),E=!!(t.image||e.image),g=(v=t.extension)==null?void 0:v.call(t);return r.value=!!(e.extended||g),a(e.tag,{class:B(["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},i.value,P.value,S.value,N.value,H.value,I.value,e.class]),style:_([o.value,e.style])},{default:()=>[E&&l("div",{key:"image",class:"v-toolbar__image"},[t.image?a(c,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},t.image):a(G,{key:"image-img",cover:!0,src:e.image},null)]),a(c,{defaults:{VTabs:{height:n(d.value)}}},{default:()=>{var b,f,h;return[l("div",{class:"v-toolbar__content",style:{height:n(d.value)}},[t.prepend&&l("div",{class:"v-toolbar__prepend"},[(b=t.prepend)==null?void 0:b.call(t)]),R&&a(O,{key:"title",text:e.title},{text:t.title}),(f=t.default)==null?void 0:f.call(t),t.append&&l("div",{class:"v-toolbar__append"},[(h=t.append)==null?void 0:h.call(t)])])]}}),a(c,{defaults:{VTabs:{height:n(u.value)}}},{default:()=>[a(K,null,{default:()=>[r.value&&l("div",{class:"v-toolbar__extension",style:{height:n(u.value)}},[g])]})]})]})}),{contentHeight:d,extensionHeight:u}}});export{te as V,O as a};
