import React from 'react';
import { Badge, Box, Tooltip } from '@wix/design-system';
import { LockLockedFilledSmall, FlagFilledSmall, } from '@wix/wix-ui-icons-common';
import { useWixPatternsContainer } from '@wix/bex-core/react';
import { observer } from 'mobx-react-lite';
function _FieldIndications({ column }) {
    const { translate: t } = useWixPatternsContainer();
    const { isPii, isPrimary, isSystem, dataExtension } = column;
    const isDataExtension = !!dataExtension;
    const isNonEditableAppField = !isSystem && isDataExtension && !dataExtension?.editable;
    const isEditableAppField = !isSystem && isDataExtension && dataExtension?.editable;
    const hasAny = isPii || isPrimary || isSystem || isDataExtension;
    if (!hasAny) {
        return null;
    }
    return (React.createElement(Box, { gap: "SP1", verticalAlign: "middle", inline: true },
        isPii && (React.createElement(Tooltip, { key: "pii", content: t('cairo.table.custom-columns.indication.pii.tooltip'), appendTo: "window" },
            React.createElement(Box, { align: "center", verticalAlign: "middle", color: "G10" },
                React.createElement(LockLockedFilledSmall, null)))),
        isPrimary && (React.createElement(Tooltip, { key: "primary", content: t('cairo.table.custom-columns.indication.primary.tooltip'), appendTo: "window" },
            React.createElement(Box, { align: "center", verticalAlign: "middle" },
                React.createElement(FlagFilledSmall, null)))),
        isSystem && (React.createElement(Tooltip, { key: "system", content: t('cairo.table.custom-columns.indication.system.tooltip'), appendTo: "window" },
            React.createElement(Badge, { size: "tiny", skin: "neutralLight", type: "outlined", uppercase: false }, t('cairo.table.custom-columns.indication.system')))),
        isNonEditableAppField && (React.createElement(Tooltip, { key: "app", content: t('cairo.table.custom-columns.indication.app.tooltip'), appendTo: "window" },
            React.createElement(Badge, { size: "tiny", skin: "neutralLight", type: "outlined", uppercase: false }, t('cairo.table.custom-columns.indication.app')))),
        isEditableAppField && (React.createElement(Tooltip, { key: "user", content: t('cairo.table.custom-columns.indication.user.tooltip'), appendTo: "window" },
            React.createElement(Badge, { size: "tiny", skin: "neutralLight", type: "outlined", uppercase: false }, t('cairo.table.custom-columns.indication.user'))))));
}
export const FieldIndications = observer(_FieldIndications);
//# sourceMappingURL=FieldIndications.js.map