<template>
  <div class="el-form-split-line"
    :class="[
      elFormSplitLineSize ? 'el-form-split-line--' + elFormSplitLineSize : '',
      type ? 'el-form-split-line--' + type : '',
    ]"
  >
    <div class='head-name'>
      <slot></slot>
    </div>
    <div class="head-line"></div>
  </div>
</template>

<script>
export default {
  name: 'ElFormSplitLine',
  inject: {
    elForm: {
      default: ''
    },
    elFormItem: {
      default: ''
    }
  },
  props: {
    size: String,
    type: {
      type: String,
      default: 'default'
    }
  },
  computed: {
    _formSize() {
      return (this.elForm || {}).size;
    },
    elFormSplitLineSize() {
      return this.size || this._formSize || (this.$ELEMENT || {}).size;
    },
    buttonDisabled() {
      return this.disabled || (this.elForm || {}).disabled;
    }
  }
};
</script>