/**
 * DevExtreme (esm/renovation/ui/scheduler/workspaces/month/date_table/layout.js)
 * Version: 21.1.7 (build 22012-0313)
 * Build date: Wed Jan 12 2022
 *
 * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
var _excluded = ["addDateTableClass", "bottomVirtualRowHeight", "dataCellTemplate", "groupOrientation", "leftVirtualCellWidth", "rightVirtualCellWidth", "topVirtualRowHeight", "viewData"];
import {
    createComponentVNode,
    normalizeProps
} from "inferno";
import {
    InfernoWrapperComponent
} from "@devextreme/vdom";
import {
    DateTableLayoutBase
} from "../../base/date_table/layout";
import {
    LayoutProps
} from "../../base/layout_props";
import {
    MonthDateTableCell
} from "./cell";
export var viewFunction = _ref => {
    var {
        props: {
            addDateTableClass: addDateTableClass,
            dataCellTemplate: dataCellTemplate,
            groupOrientation: groupOrientation,
            viewData: viewData
        },
        restAttributes: restAttributes
    } = _ref;
    return normalizeProps(createComponentVNode(2, DateTableLayoutBase, _extends({
        viewData: viewData,
        groupOrientation: groupOrientation,
        addDateTableClass: addDateTableClass,
        dataCellTemplate: dataCellTemplate,
        cellTemplate: MonthDateTableCell
    }, restAttributes)))
};
var getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);
export class MonthDateTableLayout extends InfernoWrapperComponent {
    constructor(props) {
        super(props);
        this.state = {}
    }
    get restAttributes() {
        var _this$props = this.props,
            restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
        return restProps
    }
    render() {
        var props = this.props;
        return viewFunction({
            props: _extends({}, props, {
                dataCellTemplate: getTemplate(props.dataCellTemplate)
            }),
            restAttributes: this.restAttributes
        })
    }
}
MonthDateTableLayout.defaultProps = _extends({}, LayoutProps);
