import { defineComponent, computed, createVNode } from 'vue';
import getPrefixCls from '../_util/getPrefixCls';
import { useTheme } from '../_theme/useTheme';

const prefixCls = getPrefixCls('divider');
const dividerProps = {
  // 是否是垂直方向
  vertical: {
    type: Boolean,
    default: false
  },
  // 文字的位置
  titlePlacement: {
    type: String,
    default: 'center'
  }
};
var divider = defineComponent({
  name: 'FDivider',
  props: dividerProps,
  setup(props, _ref) {
    let {
      slots
    } = _ref;
    useTheme();
    const classList = computed(() => [prefixCls, props.vertical && 'is-vertical'].filter(Boolean).join(' '));
    return () => {
      var _slots$default;
      return createVNode("div", {
        "class": classList.value
      }, [!props.vertical ? createVNode("div", {
        "class": `${prefixCls}-text is-${props.titlePlacement}`
      }, [(_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]) : null]);
    };
  }
});

export { divider as default, dividerProps };
