"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _cell = _interopRequireDefault(require("./cell"));
var _comp = require("../../ui/src/comp");
var _util = require("./util");
var _column = require("./column");
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() {
    return {
      $xeColumn: this,
      $xeGrid: null,
      $xeGantt: null
    };
  },
  inject: {
    $xeTable: {
      default: null
    },
    $xeColumn: {
      default: null
    }
  },
  watch: _column.columnWatch,
  created() {
    const $xeTable = this.$xeTable;
    this.columnConfig = this.createColumn($xeTable, this);
  },
  mounted() {
    const {
      $scopedSlots
    } = this;
    const columnSlots = {};
    if ($scopedSlots.header) {
      columnSlots.header = $scopedSlots.header;
    }
    this.columnConfig.slots = columnSlots;
    (0, _util.assembleColumn)(this);
  },
  destroyed() {
    (0, _util.destroyColumn)(this);
  },
  render(h) {
    return h('div', this.$slots.default);
  },
  methods: _cell.default
});
/* define-vxe-component end */