/**
 * ldesign v0.2.3
 * (c) 2022年9月24日 swimly
 * @license MIT
 */

import props from './props.js';
import { renderContent } from '../../utils/render-node.js';
import { getClassPrefixMixins } from '../config-provider/config-receiver.js';
import mixins from '../../utils/mixins.js';
import 'vue';
import 'lodash/camelCase';
import 'lodash/kebabCase';
import 'lodash/mergeWith';
import 'lodash';
import '../config-provider/context.js';
import '../../chunks/zh_CN.js';
import '../config-provider/type.js';

var _Divider = mixins(getClassPrefixMixins("divider")).extend({
  name: "LDivider",
  props: { ...props
  },

  render() {
    const h = arguments[0];
    const {
      componentName: NAME,
      commonSizeClassName: SIZE
    } = this;
    const isSetSize = this.size && ["small", "medium", "large"].includes(this.size);
    const children = this.layout !== "vertical" && renderContent(this, "default", "content");
    const classes = [`${NAME}`, [`${NAME}--${this.layout || "horizontal"}`], {
      [`${NAME}--dashed`]: !!this.dashed,
      [`${NAME}--with-text`]: !!children,
      [`${NAME}--with-text-${this.align}`]: !!children,
      [SIZE[this.size]]: isSetSize
    }];
    let styles = {};

    if (!isSetSize) {
      styles = this.layout === "horizontal" ? {
        margin: `${this.size} 0`
      } : {
        margin: `0 ${this.size}`
      };
    }

    return h("div", {
      "style": styles,
      "class": classes
    }, [children && h("span", {
      "class": `${NAME}__inner-text`
    }, [children])]);
  }

});

export { _Divider as default };
//# sourceMappingURL=divider.js.map
