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