"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _comp = require("../../ui/src/comp");
var _util = require("./util");
var _column = require("./column");
var _cell = _interopRequireDefault(require("./cell"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var _default = exports.default = /* define-vxe-component start */(0, _comp.defineVxeComponent)({
  name: 'VxeColgroup',
  props: _column.columnProps,
  provide() {
    const $xeColgroup = this;
    return {
      $xeColumn: $xeColgroup,
      $xeGrid: null,
      $xeGantt: null
    };
  },
  inject: {
    $xeTable: {
      default: null
    },
    $xeColumn: {
      default: null
    }
  },
  watch: _column.columnWatch,
  created() {
    const $xeColgroup = this;
    const props = $xeColgroup;
    const $xeTable = this.$xeTable;
    this.columnConfig = _cell.default.createColumn($xeTable, props);
  },
  mounted() {
    const $xeColgroup = this;
    const {
      $scopedSlots
    } = this;
    const columnSlots = {};
    if ($scopedSlots.header) {
      columnSlots.header = $scopedSlots.header;
    }
    if ($scopedSlots.title) {
      columnSlots.title = $scopedSlots.title;
    }
    this.columnConfig.slots = columnSlots;
    (0, _util.assembleColumn)($xeColgroup);
  },
  destroyed() {
    const $xeColgroup = this;
    (0, _util.destroyColumn)($xeColgroup);
  },
  render(h) {
    return h('div', this.$slots.default);
  },
  methods: _cell.default
});
/* define-vxe-component end */