import{w as t,c as D,aQ as w}from"./index.b8342cb4.js";import R from"./PageFooter.83a6d9ab.js";import{H as I}from"./vendor-ant-design-vue.3e0197c8.js";import{useContentHeight as K}from"./useContentHeight.12eb817f.js";import{_ as L}from"./vendor-vue-esign.3f5af73e.js";import{o as H}from"./vendor-lodash-es.ed8922d2.js";import{f as M,r as p,p as A,e as r,u as E,w as Q,b8 as P,b2 as c,ax as b,av as S,aC as U,b7 as Z,bu as d,R as l,af as q,aN as G,F as J,H as X,ah as Y,aZ as x,aw as v,ay as ee,ae as $,ag as te}from"./vendor-@vue.d54eea3a.js";const oe=M({name:"PageWrapper",components:{PageFooter:R,PageHeader:I},inheritAttrs:!1,props:{title:t.string,dense:t.bool,ghost:t.bool,content:t.string,contentStyle:{type:Object},contentBackground:t.bool,contentFullHeight:t.bool,contentClass:t.string,fixedHeight:t.bool,upwardSpace:t.oneOfType([t.number,t.string]).def(0)},setup(e,{slots:o,attrs:y}){const f=p(null),u=p(null),h=p(null),s=p(null),{prefixCls:a}=D("page-wrapper");A(k,r(()=>e.fixedHeight));const i=r(()=>e.contentFullHeight),m=r(()=>e.upwardSpace),{redoHeight:W,setCompensation:O,contentHeight:j}=K(i,f,[u,s],[h],m);O({useLayoutFooter:!0,elements:[s]});const B=r(()=>{var n;return[a,{[`${a}--dense`]:e.dense},(n=y.class)!=null?n:{}]}),F=r(()=>(o==null?void 0:o.leftFooter)||(o==null?void 0:o.rightFooter)),z=r(()=>Object.keys(H(o,"default","leftFooter","rightFooter","headerContent"))),T=r(()=>{const{contentFullHeight:n,contentStyle:g,fixedHeight:V}=e;if(!n)return{...g};const C=`${E(j)}px`;return{...g,minHeight:C,...V?{height:C}:{}}}),N=r(()=>{const{contentBackground:n,contentClass:g}=e;return[`${a}-content`,g,{[`${a}-content-bg`]:n}]});return Q(()=>[F.value],()=>{W()},{flush:"post",immediate:!0}),{getContentStyle:T,wrapperRef:f,headerRef:u,contentRef:h,footerRef:s,getClass:B,getHeaderSlots:z,prefixCls:a,getShowFooter:F,omit:H,getContentClass:N}}});function re(e,o,y,f,u,h){const s=P("PageHeader"),a=P("PageFooter");return c(),b("div",{class:$(e.getClass),ref:"wrapperRef"},[e.content||e.$slots.headerContent||e.title||e.getHeaderSlots.length?(c(),S(s,x({key:0,ghost:e.ghost,title:e.title},e.omit(e.$attrs,"class"),{ref:"headerRef"}),U({default:d(()=>[e.content?(c(),b(J,{key:0},[X(Y(e.content),1)],64)):l(e.$slots,"headerContent",{},void 0,void 0,1)]),_:2},[Z(e.getHeaderSlots,i=>({name:i,fn:d(m=>[l(e.$slots,i,q(G(m||{})))])}))]),1040,["ghost","title"])):v("",!0),ee("div",{class:$(["overflow-hidden",e.getContentClass]),style:te(e.getContentStyle),ref:"contentRef"},[l(e.$slots,"default")],6),e.getShowFooter?(c(),S(a,{key:1,ref:"footerRef"},{left:d(()=>[l(e.$slots,"leftFooter")]),right:d(()=>[l(e.$slots,"rightFooter")]),_:3},512)):v("",!0)],2)}var _=L(oe,[["render",re]]),fe=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"}));const ae=w(R),ne=w(_),k="PageWrapperFixedHeight";var ue=Object.freeze(Object.defineProperty({__proto__:null,PageFooter:ae,PageWrapper:ne,PageWrapperFixedHeightKey:k},Symbol.toStringTag,{value:"Module"}));export{k as P,ne as a,fe as b,ue as i};
