"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),x=require("../_util/props-util/index.js"),y=require("../_util/type.js"),M=require("../config-provider/hooks/useConfigInject.js"),p=require("./style/index.js"),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=n.defineComponent({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:s(),setup(e,{slots:d,attrs:r}){const{prefixCls:a,direction:c}=M.default("divider",e),[f,o]=p.default(a),l=n.computed(()=>e.orientation==="left"&&e.orientationMargin!=null),u=n.computed(()=>e.orientation==="right"&&e.orientationMargin!=null),g=n.computed(()=>{const{type:t,dashed:m,plain:$}=e,i=a.value;return{[i]:!0,[o.value]:!!o.value,[`${i}-${t}`]:!0,[`${i}-dashed`]:!!m,[`${i}-plain`]:!!$,[`${i}-rtl`]:c.value==="rtl",[`${i}-no-default-orientation-margin-left`]:l.value,[`${i}-no-default-orientation-margin-right`]:u.value}}),v=n.computed(()=>{const t=typeof e.orientationMargin=="number"?`${e.orientationMargin}px`:e.orientationMargin;return{...l.value&&{marginLeft:t},...u.value&&{marginRight:t}}}),h=n.computed(()=>e.orientation.length>0?`-${e.orientation}`:e.orientation);return()=>{const t=x.flattenChildren(d.default?.());return f(n.createVNode("div",{...r,class:[g.value,t.length?`${a.value}-with-text ${a.value}-with-text${h.value}`:"",r.class],role:"separator"},[t.length?n.createVNode("span",{class:`${a.value}-inner-text`,style:v.value},[t]):null]))}}}),S=y.withInstall(C);exports.default=S;exports.dividerProps=s;
