/**
 * DevExtreme (esm/renovation/utils/plugin/placeholder_item_renderer.js)
 * Version: 22.1.3 (build 22180-0310)
 * Build date: Wed Jun 29 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 = ["baseTemplate", "column", "currentTemplate", "deps"];
import {
    createComponentVNode,
    normalizeProps
} from "inferno";
import {
    BaseInfernoComponent
} from "@devextreme/runtime/inferno";
export var viewFunction = _ref => {
    var {
        props: {
            baseTemplate: baseTemplate,
            column: column,
            currentTemplate: CurrentTemplate,
            deps: deps
        }
    } = _ref;
    return CurrentTemplate({
        deps: deps,
        column: column,
        baseTemplate: baseTemplate
    })
};
export var PlaceholderItemRendererProps = {
    deps: Object.freeze([])
};
var getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);
export class PlaceholderItemRenderer extends BaseInfernoComponent {
    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, {
                currentTemplate: getTemplate(props.currentTemplate),
                baseTemplate: getTemplate(props.baseTemplate)
            }),
            restAttributes: this.restAttributes
        })
    }
}
PlaceholderItemRenderer.defaultProps = PlaceholderItemRendererProps;
