import { defineComponent } from 'vue' ; import { getPrefixCls } from '../_utils/global-config' ; export default defineComponent ( { name : 'Divider' , props : { zh en values direction : { type : String , validator : ( value ) => [ 'horizontal' , 'vertical' ] . includes ( value ) , default : 'horizontal' } , zh en values orientation : { type : String , validator : ( value ) => [ 'left' , 'right' , 'center' ] . includes ( value ) , default : 'center' } } , setup ( props , { slots } ) { const prefixCls = getPrefixCls ( 'divider' ) ; return ( ) => { const { direction , orientation } = props ; const children = slots . default ?. ( ) ; const classNames = [ prefixCls , `${ prefixCls }-${ direction }` , { [ `${ prefixCls }-with-text` ] : children } , ] ; return ( < div class = { classNames } > { children && direction === 'horizontal' ? ( < span class = { `${ prefixCls }-text ${ prefixCls }-text-${ orientation }` } > { children } < /span>) : null} < /div>); } ; } } ) ;