/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

import { renderContent } from '../../utils/render-node.js';
import { getClassPrefixMixins } from '../config-provider/config-receiver.js';
import mixins from '../../utils/mixins.js';
import props from './props.js';
import 'vue';
import 'lodash';
import 'lodash/mergeWith';
import '../config-provider/context.js';
import '../../_chunks/dep-def4c2ce.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
