export default {
    functional: true,
    render(h, {
        props: {
            row, column: { property, labelClassName }, cellIndex, cell
        } 
    }) {
        const cellValue = (row.data || [])[property];
        const cellTag = 'div';
        const cellProps = {
            class: [labelClassName],
            staticClass: 'cell'
        };

        if (cellIndex === 0) {
            return h(cellTag, cellProps, [row.label]);
        } if (cell) {
            return h(cellTag, cellProps, [cell({ row })]);
        } 
        return h(cellTag, cellProps, [cellValue]);
    }
};