"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = __importDefault(require("../types"));
exports.MIDDLEWARE_INSTANCE_TYPE = "MiddlewareComponent";
/**
 * The Middleware (is an Express-Middleware!) has no Plugin because it requires no
 *
 * @param props
 */
exports.default = (props) => {
    //console.log ("middleware: ",props );
    // the component must have the properties of IComponent
    const componentProps = {
        infrastructureType: types_1.default.INFRASTRUCTURE_TYPE_COMPONENT,
        instanceType: exports.MIDDLEWARE_INSTANCE_TYPE,
        instanceId: undefined,
    };
    return Object.assign(componentProps, props);
};
exports.isMiddleware = (component) => {
    return component !== undefined &&
        component.instanceType === exports.MIDDLEWARE_INSTANCE_TYPE;
};
//# sourceMappingURL=middleware-component.js.map