var M=Object.defineProperty,q=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var v=(e,t,o)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,m=(e,t)=>{for(var o in t||(t={}))Q.call(t,o)&&v(e,o,t[o]);if(w)for(var o of w(t))X.call(t,o)&&v(e,o,t[o]);return e},k=(e,t)=>q(e,J(t));import{C as V,A as Y,_ as j,F as n,w as z}from"./index-Cy4uayzW.js";import{d as A,a2 as g,a3 as y,a4 as H,ai as a,a6 as c,ac as I,f as C,p as Z,e as r,u as _,w as x,U as b,ad as R,aj as ee,ae as te,af as $,ak as oe,al as ne,F as re,G as ae,a5 as se,ag as le,V as B}from"./vue-vendor-CxLCUzY4.js";import{o as W,a1 as ie}from"./antd-vue-vendor-CahNzUUa.js";import{useContentHeight as ge}from"./useContentHeight-XU-h1taH.js";import{P as ce}from"./injectionKey-DPVn4AgL.js";const de=A({name:"PageFooter",inheritAttrs:!1,setup(){const{prefixCls:e}=V("page-footer"),{getCalcContentWidth:t}=Y();return{prefixCls:e,getCalcContentWidth:t}}});function pe(e,t,o,d,p,f){return g(),y("div",{class:c(e.prefixCls),style:I({width:e.getCalcContentWidth})},[H("div",{class:c(`${e.prefixCls}__left`)},[a(e.$slots,"left",{},void 0,!0)],2),a(e.$slots,"default",{},void 0,!0),H("div",{class:c(`${e.prefixCls}__right`)},[a(e.$slots,"right",{},void 0,!0)],2)],6)}const N=j(de,[["render",pe],["__scopeId","data-v-fe353944"]]),fe=A({name:"PageWrapper",components:{PageFooter:N,PageHeader:ie},inheritAttrs:!1,props:{title:n.string,dense:n.bool,ghost:n.bool,content:n.string,contentStyle:{type:Object},contentBackground:n.bool,contentFullHeight:n.bool,contentClass:n.string,fixedHeight:n.bool,upwardSpace:n.oneOfType([n.number,n.string]).def(0)},setup(e,{slots:t,attrs:o}){const d=C(null),p=C(null),f=C(null),i=C(null),{prefixCls:s}=V("page-wrapper");Z(ce,r(()=>e.fixedHeight));const u=r(()=>e.contentFullHeight),F=r(()=>e.upwardSpace),{redoHeight:O,setCompensation:T,contentHeight:D}=ge(u,d,[p,i],[f],F);T({useLayoutFooter:!0,elements:[i]});const L=r(()=>{var l;return[s,{[`${s}--dense`]:e.dense},(l=o.class)!=null?l:{}]}),S=r(()=>(t==null?void 0:t.leftFooter)||(t==null?void 0:t.rightFooter)),U=r(()=>Object.keys(W(t,"default","leftFooter","rightFooter","headerContent"))),E=r(()=>{const{contentFullHeight:l,contentStyle:h,fixedHeight:K}=e;if(!l)return m({},h);const P=`${_(D)}px`;return m(k(m({},h),{minHeight:P}),K?{height:P}:{})}),G=r(()=>{const{contentBackground:l,contentClass:h}=e;return[`${s}-content`,h,{[`${s}-content-bg`]:l}]});return x(()=>[S.value],()=>{O()},{flush:"post",immediate:!0}),{getContentStyle:E,wrapperRef:d,headerRef:p,contentRef:f,footerRef:i,getClass:L,getHeaderSlots:U,prefixCls:s,getShowFooter:S,omit:W,getContentClass:G}}});function ue(e,t,o,d,p,f){const i=b("PageHeader"),s=b("PageFooter");return g(),y("div",{class:c(e.getClass),ref:"wrapperRef"},[e.content||e.$slots.headerContent||e.title||e.getHeaderSlots.length?(g(),R(i,le({key:0,ghost:e.ghost,title:e.title},e.omit(e.$attrs,"class"),{ref:"headerRef"}),ee({default:$(()=>[e.content?(g(),y(re,{key:0},[ae(se(e.content),1)],64)):a(e.$slots,"headerContent",{key:1})]),_:2},[te(e.getHeaderSlots,u=>({name:u,fn:$(F=>[a(e.$slots,u,oe(ne(F||{})))])}))]),1040,["ghost","title"])):B("",!0),H("div",{class:c(["overflow-hidden",e.getContentClass]),style:I(e.getContentStyle),ref:"contentRef"},[a(e.$slots,"default")],6),e.getShowFooter?(g(),R(s,{key:1,ref:"footerRef"},{left:$(()=>[a(e.$slots,"leftFooter")]),right:$(()=>[a(e.$slots,"rightFooter")]),_:3},512)):B("",!0)],2)}const he=j(fe,[["render",ue]]),Se=z(N),Pe=z(he);export{Pe as P};
