import { Box, Text, Tooltip } from '@wix/design-system'; import { StatusAlertFilledSmall, InfoCircleSmall, } from '@wix/wix-ui-icons-common'; import { ImportState } from '@wix/bex-core'; import React from 'react'; import { observer } from 'mobx-react-lite'; export interface ImportRequiredFieldsSideNoteProps { state: ImportState; } /** * Footer side-note shown in the mapping step while required destination fields * are unmapped (CAIRO-4452): a red "Missing N required field(s)" line plus an * info icon whose tooltip lists which fields. Rendered in the modal's * `sideActions` (the footer's left region, in the button row) rather than the * full-width footnote strip. The Import button stays enabled — the click is * blocked (with a toast) in `ImportState.startImport`. */ function _ImportRequiredFieldsSideNote({ state, }: ImportRequiredFieldsSideNoteProps) { const { translate: t, missingRequiredFields } = state; const fieldNames = missingRequiredFields .map((field) => field.header || field.id || '') .filter(Boolean) .join(', '); return ( {t('cairo.import.missingRequiredField', { count: missingRequiredFields.length, })} ); } export const ImportRequiredFieldsSideNote = observer( _ImportRequiredFieldsSideNote, );