"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.ENVIRONMENT_INSTANCE_TYPE = "EnvironmentComponent";
/**
 * identifies a component as a WebApp: it implements all the required fields
 *
 * @param component to be tested
 */
function isEnvironment(component) {
    return component !== undefined &&
        component.instanceType === exports.ENVIRONMENT_INSTANCE_TYPE;
}
exports.isEnvironment = isEnvironment;
exports.default = (props) => {
    const componentProps = {
        infrastructureType: types_1.default.INFRASTRUCTURE_TYPE_COMPONENT,
        instanceType: exports.ENVIRONMENT_INSTANCE_TYPE,
        instanceId: props.name
    };
    const environmentProps = {};
    return Object.assign(props, componentProps, environmentProps);
};
//# sourceMappingURL=environment-component.js.map