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