import{g,p as v,n as b,o as a,q as f,r as h,x,C as y,E as l,c as N,b as H,e as E,f as I,G as R,H as D,K as z,i as m,m as w,v as $,z as q,A,D as F,am as G,an as u,s as o,cM as K}from"./index-BRUnowC8.js";const M=v({text:String,...y(),...x()},"VToolbarTitle"),U=g()({name:"VToolbarTitle",props:M(),setup(e,s){let{slots:t}=s;return b(()=>{const n=!!(t.default||t.text||e.text);return a(e.tag,{class:h(["v-toolbar-title",e.class]),style:f(e.style)},{default:()=>[n&&l("div",{class:"v-toolbar-title__placeholder"},[t.text?t.text():e.text,t.default?.()])]})}),{}}}),j=[null,"prominent","default","comfortable","compact"],J=v({absolute:Boolean,collapse:Boolean,collapsePosition:{type:String,default:"start"},color:String,density:{type:String,default:"default",validator:e=>j.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...F(),...y(),...A(),...q(),...x({tag:"header"}),...$()},"VToolbar"),O=g()({name:"VToolbar",props:J(),setup(e,s){let{slots:t}=s;const{backgroundColorClasses:n,backgroundColorStyles:T}=N(()=>e.color),{borderClasses:V}=H(e),{elevationClasses:k}=E(e),{roundedClasses:C}=I(e),{themeClasses:_}=R(e),{rtlClasses:P}=D(),i=z(e.extended===null?!!t.extension?.():e.extended),d=m(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),r=m(()=>i.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 w({VBtn:{variant:"text"}}),b(()=>{const B=!!(e.title||t.title),S=!!(t.image||e.image),c=t.extension?.();return i.value=e.extended===null?!!c:e.extended,a(e.tag,{class:h(["v-toolbar",`v-toolbar--collapse-${e.collapsePosition}`,{"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},n.value,V.value,k.value,C.value,_.value,P.value,e.class]),style:f([T.value,e.style])},{default:()=>[S&&l("div",{key:"image",class:"v-toolbar__image"},[t.image?a(u,{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(u,{defaults:{VTabs:{height:o(d.value)}}},{default:()=>[l("div",{class:"v-toolbar__content",style:{height:o(d.value)}},[t.prepend&&l("div",{class:"v-toolbar__prepend"},[t.prepend?.()]),B&&a(U,{key:"title",text:e.title},{text:t.title}),t.default?.(),t.append&&l("div",{class:"v-toolbar__append"},[t.append?.()])])]}),a(u,{defaults:{VTabs:{height:o(r.value)}}},{default:()=>[a(K,null,{default:()=>[i.value&&l("div",{class:"v-toolbar__extension",style:{height:o(r.value)}},[c])]})]})]})}),{contentHeight:d,extensionHeight:r}}});export{O as V,U as a};
