/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
import _extends from "@babel/runtime/helpers/extends";
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { useMemo } from 'react';
import { browser } from '@atlaskit/linking-common/user-agent';
import FlexibleCard from '../../../FlexibleCard';
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions } from '../utils';
const customBlockStyles = null;
const titleBlockCss = null;
const footerBlockCss = null;
const footerBlockSafariStyles = null;
const UnresolvedView = ({
  actions,
  cardState,
  children,
  onAuthorize,
  onClick,
  onError,
  showPreview = false,
  testId,
  title,
  url,
  CompetitorPrompt
}) => {
  // eslint-disable-next-line react-hooks/rules-of-hooks
  const {
    safari = false
  } = useMemo(() => browser(), []);
  return /*#__PURE__*/React.createElement(FlexibleCard, {
    appearance: "block",
    cardState: cardState,
    onAuthorize: onAuthorize,
    onClick: onClick,
    onError: onError,
    origin: "smartLinkCard",
    testId: testId,
    ui: FlexibleCardUiOptions,
    url: url
  }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
    hideIcon: !!title,
    text: title,
    CompetitorPrompt: CompetitorPrompt,
    className: ax(["_zulpu2gc _13mh1pd9 _2yhz13af"])
  })), /*#__PURE__*/React.createElement(CustomBlock, {
    className: ax(["_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc0i7uo"])
  }, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, {
    actions: actions,
    testId: "smart-block-card-footer",
    className: ax(["_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb", safari && "_4t3i1osq"])
  }));
};
export default UnresolvedView;