import wn from '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { CopyableText } from './CopyableText.mjs';
import { FlexBox } from '../shared/components/FlexBox.mjs';
import { Typography } from './Typography.mjs';

const SCIMFields = ({ fields, connection })=>{
    return /*#__PURE__*/ wn.createElement(wn.Fragment, null, fields?.map((field, index)=>{
        const label = field.label;
        const value = 'value' in field ? field.value : connection[field.scimConnectionKey];
        return /*#__PURE__*/ wn.createElement(FlexBox, {
            gap: 0.5,
            flexDirection: "column",
            key: index
        }, /*#__PURE__*/ wn.createElement(Typography, {
            variant: "body2",
            color: "secondary"
        }, label), field.isCopyable ? /*#__PURE__*/ wn.createElement(CopyableText, null, value) : /*#__PURE__*/ wn.createElement(Typography, {
            variant: "body2"
        }, value));
    }));
};

export { SCIMFields };
//# sourceMappingURL=ScimFields.mjs.map
