/**
 * DevExtreme (esm/__internal/scheduler/r1/components/base/all_day_panel_table_body.js)
 * Version: 23.2.6 (build 24140-0112)
 * Build date: Sun May 19 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
import {
    createComponentVNode
} from "inferno";
import {
    BaseInfernoComponent
} from "@devextreme/runtime/inferno";
import {
    getTemplate
} from "../../../../core/r1/utils/index";
import {
    renderUtils
} from "../../utils/index";
import {
    AllDayPanelCell
} from "./all_day_panel_cell";
import {
    Row
} from "./row";
export var AllDayPanelTableBodyDefaultProps = {
    viewData: [],
    isVerticalGroupOrientation: false,
    className: "",
    leftVirtualCellWidth: 0,
    rightVirtualCellWidth: 0
};
export class AllDayPanelTableBody extends BaseInfernoComponent {
    render() {
        var {
            className: className,
            leftVirtualCellWidth: leftVirtualCellWidth,
            rightVirtualCellWidth: rightVirtualCellWidth,
            leftVirtualCellCount: leftVirtualCellCount,
            rightVirtualCellCount: rightVirtualCellCount,
            viewData: viewData,
            isVerticalGroupOrientation: isVerticalGroupOrientation,
            dataCellTemplate: dataCellTemplate
        } = this.props;
        var classes = renderUtils.combineClasses({
            "dx-scheduler-all-day-table-row": true,
            [null !== className && void 0 !== className ? className : ""]: !!className
        });
        var DataCellTemplateComponent = getTemplate(dataCellTemplate);
        return createComponentVNode(2, Row, {
            leftVirtualCellWidth: leftVirtualCellWidth,
            rightVirtualCellWidth: rightVirtualCellWidth,
            leftVirtualCellCount: leftVirtualCellCount,
            rightVirtualCellCount: rightVirtualCellCount,
            className: classes,
            children: viewData.map(_ref => {
                var {
                    endDate: endDate,
                    groupIndex: cellGroupIndex,
                    groups: groups,
                    index: cellIndex,
                    isFirstGroupCell: isFirstGroupCell,
                    isFocused: isFocused,
                    isLastGroupCell: isLastGroupCell,
                    isSelected: isSelected,
                    key: key,
                    startDate: startDate
                } = _ref;
                return createComponentVNode(2, AllDayPanelCell, {
                    isFirstGroupCell: !isVerticalGroupOrientation && isFirstGroupCell,
                    isLastGroupCell: !isVerticalGroupOrientation && isLastGroupCell,
                    startDate: startDate,
                    endDate: endDate,
                    groups: groups,
                    groupIndex: cellGroupIndex,
                    index: cellIndex,
                    dataCellTemplate: DataCellTemplateComponent,
                    isSelected: null !== isSelected && void 0 !== isSelected ? isSelected : false,
                    isFocused: null !== isFocused && void 0 !== isFocused ? isFocused : false
                }, key)
            })
        })
    }
}
AllDayPanelTableBody.defaultProps = AllDayPanelTableBodyDefaultProps;
