/**
 * DevExtreme (esm/renovation/utils/plugin/placeholder_extender.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 = ["deps", "order", "template", "type"];
import {
    createVNode,
    createComponentVNode,
    normalizeProps
} from "inferno";
import {
    InfernoEffect,
    InfernoWrapperComponent
} from "@devextreme/runtime/inferno";
import {
    PluginsContext
} from "./context";
export var PlaceholderExtenderProps = {
    deps: Object.freeze([])
};
export var viewFunction = () => createVNode(1, "div");
import {
    createReRenderEffect
} from "@devextreme/runtime/inferno";
var getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);
export class PlaceholderExtender extends InfernoWrapperComponent {
    constructor(props) {
        super(props);
        this.state = {};
        this.extendPlaceholder = this.extendPlaceholder.bind(this)
    }
    get plugins() {
        if ("PluginsContext" in this.context) {
            return this.context.PluginsContext
        }
        return PluginsContext
    }
    createEffects() {
        return [new InfernoEffect(this.extendPlaceholder, [this.plugins, this.props.type, this.props.order, this.props.template, this.props.deps]), createReRenderEffect()]
    }
    updateEffects() {
        var _this$_effects$;
        null === (_this$_effects$ = this._effects[0]) || void 0 === _this$_effects$ ? void 0 : _this$_effects$.update([this.plugins, this.props.type, this.props.order, this.props.template, this.props.deps])
    }
    extendPlaceholder() {
        return this.plugins.extendPlaceholder(this.props.type, this.props.order, this.props.template, this.props.deps)
    }
    get restAttributes() {
        var _this$props = this.props,
            restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
        return restProps
    }
    render() {
        this.props;
        return viewFunction()
    }
}
PlaceholderExtender.defaultProps = PlaceholderExtenderProps;
