var _a;
import React from 'react';
import classnames from 'classnames';
import i18n from 'ui-i18n';
import Chip from '@mui/material/Chip';
import styles from './EditorStatusChip.module.css';
export var EditorStatus;
(function (EditorStatus) {
    EditorStatus["UPDATED"] = "updated";
    EditorStatus["REJECTED"] = "rejected";
    EditorStatus["RECENTLY_ADDED"] = "recentlyAdded";
})(EditorStatus || (EditorStatus = {}));
var STATUS_CLASS = (_a = {},
    _a[EditorStatus.UPDATED] = styles.updatedChip,
    _a[EditorStatus.REJECTED] = styles.rejectedChip,
    _a[EditorStatus.RECENTLY_ADDED] = styles.recentlyAddedChip,
    _a);
var getStatusLabel = function (status) {
    switch (status) {
        case EditorStatus.UPDATED:
            return i18n.text('Updated');
        case EditorStatus.REJECTED:
            return i18n.text('Rejected');
        case EditorStatus.RECENTLY_ADDED:
            return i18n.text('Recently Added');
    }
};
export var EditorStatusChip = function (_a) {
    var status = _a.status;
    if (!status) {
        return null;
    }
    return (React.createElement(Chip, { label: getStatusLabel(status), size: "small", className: classnames(styles.statusChip, STATUS_CLASS[status]), "data-testid": "editor-status-chip" }));
};
