import Cell from './cell';
import { defineVxeComponent } from '../../ui/src/comp';
import { assembleColumn, destroyColumn } from './util';
import { columnProps, columnWatch } from './column';
export default {
    name: 'VxeColgroup',
    props: columnProps,
    provide() {
        return {
            $xeColumn: this,
            $xeGrid: null,
            $xeGantt: null
        };
    },
    inject: {
        $xeTable: {
            default: null
        },
        $xeColumn: {
            default: null
        }
    },
    watch: 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;
        assembleColumn(this);
    },
    destroyed() {
        destroyColumn(this);
    },
    render(h) {
        return h('div', this.$slots.default);
    },
    methods: Cell
};
