import React from 'react';
import { HoverCard } from '../../HoverCard';
import { Frame } from '../Frame';
import { IconAndTitleLayout } from '../IconAndTitleLayout';
import { renderLozenge } from './renderLozenge';
export function InlineCardResolvedViewFunctional({
  id,
  title = '',
  isSelected,
  isHovered,
  onClick,
  icon,
  link,
  testId = 'inline-card-resolved-view',
  titleTextColor,
  titlePrefix,
  showHoverPreview = false,
  hoverPreviewOptions,
  actionOptions,
  truncateInline,
  type,
  hideIconLoadingSkeleton,
  lozenge
}) {
  const frame = /*#__PURE__*/React.createElement(Frame, {
    testId: testId,
    link: link,
    isSelected: isSelected,
    isHovered: isHovered,
    onClick: onClick,
    truncateInline: truncateInline
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
    emoji: titlePrefix,
    icon: icon,
    title: title,
    titleTextColor: titleTextColor,
    type: type,
    hideIconLoadingSkeleton: hideIconLoadingSkeleton
  }), renderLozenge(lozenge));
  if (!showHoverPreview || !link) {
    return frame;
  }
  return /*#__PURE__*/React.createElement(HoverCard, {
    id: id,
    url: link,
    actionOptions: actionOptions,
    hoverPreviewOptions: hoverPreviewOptions
  }, frame);
}