import{a as y,m as T,c as V,e as D,d as j,g as w,h as z,i as q,j as F,l as U,p as c,q as $}from"./index-w-dkzpPh.js";import{g as k,p as C,c as a,b as l,n as _,a as B,D as A,E as G,N as J,f as x,i as K,m as L,j as o}from"./index-DPl16C00.js";import{V as M}from"./VImg-B-97Yzkt.js";const O=C({text:String,...V(),...T()},"VToolbarTitle"),Q=k()({name:"VToolbarTitle",props:O(),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 n;return[i&&l("div",{class:"v-toolbar-title__placeholder"},[t.text?t.text():e.text,(n=t.default)==null?void 0:n.call(t)])]}})}),{}}}),W=[null,"prominent","default","comfortable","compact"],X=C({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>W.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,...U(),...V(),...F(),...q(),...T({tag:"header"}),...L()},"VToolbar"),ee=k()({name:"VToolbar",props:X(),setup(e,s){var m;let{slots:t}=s;const{backgroundColorClasses:i,backgroundColorStyles:n}=D(()=>e.color),{borderClasses:N}=j(e),{elevationClasses:P}=w(e),{roundedClasses:S}=z(e),{themeClasses:E}=A(e),{rtlClasses:H}=G(),d=J(e.extended===null?!!((m=t.extension)!=null&&m.call(t)):e.extended),r=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(()=>d.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 K({VBtn:{variant:"text"}}),y(()=>{var v;const I=!!(e.title||t.title),R=!!(t.image||e.image),g=(v=t.extension)==null?void 0:v.call(t);return d.value=e.extended===null?!!g:e.extended,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,N.value,P.value,S.value,E.value,H.value,e.class]),style:_([n.value,e.style])},{default:()=>[R&&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(M,{key:"image-img",cover:!0,src:e.image},null)]),a(c,{defaults:{VTabs:{height:o(r.value)}}},{default:()=>{var b,f,h;return[l("div",{class:"v-toolbar__content",style:{height:o(r.value)}},[t.prepend&&l("div",{class:"v-toolbar__prepend"},[(b=t.prepend)==null?void 0:b.call(t)]),I&&a(Q,{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:o(u.value)}}},{default:()=>[a($,null,{default:()=>[d.value&&l("div",{class:"v-toolbar__extension",style:{height:o(u.value)}},[g])]})]})]})}),{contentHeight:r,extensionHeight:u}}});export{ee as V};
