import _extends from "@babel/runtime/helpers/extends";
import React, { useMemo } from 'react';
import { FormattedMessage } from 'react-intl';
import { messages } from '../../../../messages';
import { toMessage } from '../../../../utils/intl-utils';
import UnresolvedView from '../unresolved-view';
import { NotFoundSVG } from './not-found-svg';
const NotFoundView = ({
  context,
  accessContext,
  testId = 'embed-card-not-found-view',
  ...unresolvedViewProps
}) => {
  const {
    icon,
    image,
    text = ''
  } = context !== null && context !== void 0 ? context : {};
  const {
    titleMessageKey,
    descriptiveMessageKey
  } = accessContext !== null && accessContext !== void 0 ? accessContext : {};
  const values = useMemo(() => ({
    product: text
  }), [text]);
  return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, unresolvedViewProps, {
    icon: icon,
    image: image !== null && image !== void 0 ? image : /*#__PURE__*/React.createElement(NotFoundSVG, null),
    testId: testId,
    text: text,
    title: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, toMessage(messages.not_found_title, titleMessageKey), {
      values: values
    })),
    description: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, toMessage(messages.not_found_description, descriptiveMessageKey), {
      values: values
    }))
  }));
};
export default NotFoundView;