"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_core_1 = require("@patternfly/react-core");
const info_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/info-circle-icon");
const formik_1 = require("formik");
const react_1 = tslib_1.__importDefault(require("react"));
const CollapsedManifest = ({ manifestIdx, fieldName }) => {
    const [{ value }, { error }] = (0, formik_1.useField)({
        name: fieldName,
    });
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(react_core_1.StackItem, { "data-testid": `collapsed-manifest-${manifestIdx}` },
            react_1.default.createElement(react_core_1.Flex, null,
                error && (react_1.default.createElement(react_1.default.Fragment, null,
                    react_1.default.createElement(react_core_1.FlexItem, null,
                        react_1.default.createElement(react_core_1.Label, { variant: "outline", color: "red", icon: react_1.default.createElement(info_circle_icon_1.InfoCircleIcon, null), "data-testid": "manifest-errors-label" }, "Missing information")))),
                !error && value.filename && (react_1.default.createElement(react_1.default.Fragment, null,
                    react_1.default.createElement(react_core_1.FlexItem, null,
                        react_1.default.createElement(react_core_1.Label, { variant: "outline", "data-testid": "manifest-name" }, `${value.folder}/${value.filename}`),
                        ' ')))))));
};
exports.default = CollapsedManifest;
//# sourceMappingURL=CollapsedManifest.js.map