import{defineComponent as c,ref as y,provide as x,computed as S,createVNode as f}from"vue";import g from"../config-provider/hooks/useConfigInject.mjs";import{SiderHookProviderKey as h}from"./injectionKey.mjs";import N from"./style/index.mjs";const d=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function i({suffixCls:t,tagName:r,name:a}){return u=>c({compatConfig:{MODE:3},name:a,props:d(),setup(s,{slots:l}){const{prefixCls:o}=g(t,s);return()=>{const C={...s,prefixCls:o.value,tagName:r};return f(u,C,l)}}})}const m=c({compatConfig:{MODE:3},props:d(),setup(t,{slots:r}){return()=>f(t.tagName,{class:t.prefixCls},r)}}),A=c({compatConfig:{MODE:3},inheritAttrs:!1,props:d(),setup(t,{slots:r,attrs:a}){const{prefixCls:u,direction:p}=g("",t),[s,l]=N(u),o=y([]);x(h,{addSider:e=>{o.value=[...o.value,e]},removeSider:e=>{o.value=o.value.filter(n=>n!==e)}});const v=S(()=>{const{prefixCls:e,hasSider:n}=t;return{[l.value]:!0,[`${e}`]:!0,[`${e}-has-sider`]:typeof n=="boolean"?n:o.value.length>0,[`${e}-rtl`]:p.value==="rtl"}});return()=>{const{tagName:e}=t;return s(f(e,{...a,class:[v.value,a.class]},r))}}}),k=i({suffixCls:"layout",tagName:"section",name:"ALayout"})(A),B=i({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(m),D=i({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(m),E=i({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(m);export{E as Content,D as Footer,B as Header,d as basicProps,k as default};
