import { extractSmartLinkEmbed, extractSmartLinkTitle, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
import { getEmptyJsonLd } from '../../utils/jsonld';
import { extractSmartLinkContext } from '../common/context';
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
export var extractEmbedProps = function extractEmbedProps(response, _platform, iframeUrlType) {
  var meta = response === null || response === void 0 ? void 0 : response.meta;
  var jsonLd = (response === null || response === void 0 ? void 0 : response.data) || getEmptyJsonLd();
  return {
    link: extractSmartLinkUrl(response) || '',
    title: extractSmartLinkTitle(response),
    context: extractSmartLinkContext(response),
    preview: extractSmartLinkEmbed(response, iframeUrlType),
    isTrusted: extractIsTrusted(meta),
    isSupportTheming: extractIsSupportTheming(meta),
    type: extractType(jsonLd)
  };
};