/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
require("./index.compiled.css");
var _react = _interopRequireWildcard(require("react"));
var React = _react;
var _runtime = require("@compiled/react/runtime");
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _userAgent = require("@atlaskit/linking-common/user-agent");
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
var _FlexibleCard = _interopRequireDefault(require("../../../FlexibleCard"));
var _blocks = require("../../../FlexibleCard/components/blocks");
var _utils = require("../utils");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var customBlockStyles = null;
var titleBlockCss = null;
var footerBlockCss = null;
var footerBlockSafariStyles = null;
var UnresolvedView = function UnresolvedView(_ref) {
  var actions = _ref.actions,
    cardState = _ref.cardState,
    children = _ref.children,
    onAuthorize = _ref.onAuthorize,
    onClick = _ref.onClick,
    onError = _ref.onError,
    _ref$showPreview = _ref.showPreview,
    showPreview = _ref$showPreview === void 0 ? false : _ref$showPreview,
    testId = _ref.testId,
    title = _ref.title,
    url = _ref.url,
    CompetitorPrompt = _ref.CompetitorPrompt;
  // eslint-disable-next-line react-hooks/rules-of-hooks
  var _useMemo = (0, _react.useMemo)(function () {
      return (0, _userAgent.browser)();
    }, []),
    _useMemo$safari = _useMemo.safari,
    safari = _useMemo$safari === void 0 ? false : _useMemo$safari;
  return /*#__PURE__*/React.createElement(_FlexibleCard.default, {
    appearance: "block",
    cardState: cardState,
    onAuthorize: onAuthorize,
    onClick: onClick,
    onError: onError,
    origin: "smartLinkCard",
    testId: testId,
    ui: _utils.FlexibleCardUiOptions,
    url: url
  }, /*#__PURE__*/React.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, _utils.titleBlockOptions, {
    hideIcon: !!title,
    text: title
  }, (0, _platformFeatureFlags.fg)('prompt_whiteboard_competitor_link_gate') ? {
    CompetitorPrompt: CompetitorPrompt
  } : undefined, {
    className: (0, _runtime.ax)(["_zulpu2gc _13mh1pd9 _2yhz13af"])
  })), /*#__PURE__*/React.createElement(_blocks.CustomBlock, {
    className: (0, _runtime.ax)(["_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc0i7uo"])
  }, children), showPreview && /*#__PURE__*/React.createElement(_blocks.PreviewBlock, _utils.PreviewBlockOptions), /*#__PURE__*/React.createElement(_blocks.InternalFooterBlock, {
    actions: actions,
    testId: "smart-block-card-footer",
    className: (0, _runtime.ax)(["_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb", safari && "_4t3i1osq"])
  }));
};
var _default = exports.default = UnresolvedView;