import{withInstall as e}from"../_util/type.mjs";import{flattenChildren as t}from"../_util/props-util/index.mjs";import n from"../config-provider/hooks/useConfigInject.mjs";import r from"./style/index.mjs";import{computed as i,createVNode as a,defineComponent as o}from"vue";var s=()=>({prefixCls:String,type:{type:String,default:`horizontal`},dashed:{type:Boolean,default:!1},orientation:{type:String,default:`center`},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),c=e(o({name:`ADivider`,inheritAttrs:!1,compatConfig:{MODE:3},props:s(),setup(e,{slots:o,attrs:s}){let{prefixCls:c,direction:l}=n(`divider`,e),[u,d]=r(c),f=i(()=>e.orientation===`left`&&e.orientationMargin!=null),p=i(()=>e.orientation===`right`&&e.orientationMargin!=null),m=i(()=>{let{type:t,dashed:n,plain:r}=e,i=c.value;return{[i]:!0,[d.value]:!!d.value,[`${i}-${t}`]:!0,[`${i}-dashed`]:!!n,[`${i}-plain`]:!!r,[`${i}-rtl`]:l.value===`rtl`,[`${i}-no-default-orientation-margin-left`]:f.value,[`${i}-no-default-orientation-margin-right`]:p.value}}),h=i(()=>{let t=typeof e.orientationMargin==`number`?`${e.orientationMargin}px`:e.orientationMargin;return{...f.value&&{marginLeft:t},...p.value&&{marginRight:t}}}),g=i(()=>e.orientation.length>0?`-${e.orientation}`:e.orientation);return()=>{let e=t(o.default?.());return u(a(`div`,{...s,class:[m.value,e.length?`${c.value}-with-text ${c.value}-with-text${g.value}`:``,s.class],role:`separator`},[e.length?a(`span`,{class:`${c.value}-inner-text`,style:h.value},[e]):null]))}}}));export{c as default,s as dividerProps};