import{L as R,bw as Q,bx as $,c as s,w as i,i as T,bo as m,bp as k,r as x,l as H,by as B,h,W as O,g as p}from"./index.71e82531.js";import{u as F,a as P,b as _}from"./QTabs.48f88073.js";var I=R({name:"QRouteTab",props:{...Q,...F},emits:P,setup(t,{slots:f,emit:c}){const r=$({useDisableForRouterLinkProps:!1}),{renderTab:a,$tabs:o}=_(t,f,c,{exact:s(()=>t.exact),...r});return i(()=>`${t.name} | ${t.exact} | ${(r.resolvedLink.value||{}).href}`,()=>{o.verifyRouteModel()}),()=>a(r.linkTag.value,r.linkAttrs.value)}}),N=R({name:"QHeader",props:{modelValue:{type:Boolean,default:!0},reveal:Boolean,revealOffset:{type:Number,default:250},bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},emits:["reveal","focusin"],setup(t,{slots:f,emit:c}){const{proxy:{$q:r}}=p(),a=T(k,m);if(a===m)return console.error("QHeader needs to be child of QLayout"),m;const o=x(parseInt(t.heightHint,10)),l=x(!0),v=s(()=>t.reveal===!0||a.view.value.indexOf("H")>-1||r.platform.is.ios&&a.isContainer.value===!0),b=s(()=>{if(t.modelValue!==!0)return 0;if(v.value===!0)return l.value===!0?o.value:0;const e=o.value-a.scroll.value.position;return e>0?e:0}),y=s(()=>t.modelValue!==!0||v.value===!0&&l.value!==!0),V=s(()=>t.modelValue===!0&&y.value===!0&&t.reveal===!0),q=s(()=>"q-header q-layout__section--marginal "+(v.value===!0?"fixed":"absolute")+"-top"+(t.bordered===!0?" q-header--bordered":"")+(y.value===!0?" q-header--hidden":"")+(t.modelValue!==!0?" q-layout--prevent-focus":"")),w=s(()=>{const e=a.rows.value.top,n={};return e[0]==="l"&&a.left.space===!0&&(n[r.lang.rtl===!0?"right":"left"]=`${a.left.size}px`),e[2]==="r"&&a.right.space===!0&&(n[r.lang.rtl===!0?"left":"right"]=`${a.right.size}px`),n});function u(e,n){a.update("header",e,n)}function d(e,n){e.value!==n&&(e.value=n)}function z({height:e}){d(o,e),u("size",e)}function L(e){V.value===!0&&d(l,!0),c("focusin",e)}i(()=>t.modelValue,e=>{u("space",e),d(l,!0),a.animate()}),i(b,e=>{u("offset",e)}),i(()=>t.reveal,e=>{e===!1&&d(l,t.modelValue)}),i(l,e=>{a.animate(),c("reveal",e)}),i(a.scroll,e=>{t.reveal===!0&&d(l,e.direction==="up"||e.position<=t.revealOffset||e.position-e.inflectionPoint<100)});const g={};return a.instances.header=g,t.modelValue===!0&&u("size",o.value),u("space",t.modelValue),u("offset",b.value),H(()=>{a.instances.header===g&&(a.instances.header=void 0,u("size",0),u("offset",0),u("space",!1))}),()=>{const e=B(f.default,[]);return t.elevated===!0&&e.push(h("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),e.push(h(O,{debounce:0,onResize:z})),h("header",{class:q.value,style:w.value,onFocusin:L},e)}}});export{N as Q,I as a};
