import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/inherits";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
var _iconTestResponseMap;
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import { CardClient } from '@atlaskit/link-provider';
import { AtlasProject, AtlasProjectNoPreview, GoogleDoc, GoogleDocUrl, ProfileObject, unicornResponse, YouTubeVideo, YouTubeVideoUrl } from '../example-helpers';
import { atlasProjectUrl } from '../example-helpers/_jsonLDExamples/provider.atlas';
import { overrideEmbedContent } from '../example-helpers/_jsonLDExamples/utils';
import { avatar3, figmaUnauthImage, forbiddenJira, gdriveUnauthImage, iconDropbox, iconFigma, iconGoogleDrive, iconOneDrive, iconSlack, image1, image2, imageForbiddenJiraEmbed, onedriveUnauthImage, slackUnauthImage } from '../images';
export var mocks = {
  entityDataSuccess: {
    meta: {
      visibility: 'public',
      access: 'granted',
      auth: [],
      definitionId: 'd1',
      key: 'object-provider',
      resourceType: 'object-resource',
      subproduct: 'object-subproduct',
      product: 'object-product',
      generator: {
        name: 'I love cheese',
        icon: {
          url: image2
        }
      }
    },
    data: {
      '@context': {
        '@vocab': 'https://www.w3.org/ns/activitystreams#',
        atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
        schema: 'http://schema.org/'
      },
      '@type': 'Object',
      name: 'https://some.url',
      summary: 'Here is your serving of cheese: 🧀',
      preview: {
        href: 'https://www.ilovecheese.com'
      },
      generator: {
        '@type': 'Application',
        icon: {
          '@type': 'Image',
          url: image2
        },
        name: 'I love cheese'
      },
      url: 'https://some.url'
    },
    entityData: {
      id: 'I love cheese',
      displayName: 'I love cheese',
      description: 'Here is your serving of cheese: 🧀',
      url: 'https://some.url',
      lastUpdatedAt: '2025-01-08T22:26:52.501Z',
      thumbnail: {
        externalUrl: image1
      },
      liveEmbedUrl: 'https://www.ilovecheese.com',
      type: 'FILE',
      inspectUrl: 'https://www.ilovecheese.com',
      iconUrl: image2
    }
  },
  simpleProjectPlaceholderData: {
    data: {
      '@context': AtlasProject.data['@context'],
      '@type': AtlasProject.data['@type'],
      url: AtlasProject.data.url,
      icon: AtlasProject.data.icon,
      name: 'Fancy project with placeholder data for SSR',
      'atlassian:state': AtlasProject.data['atlassian:state']
    },
    meta: {
      auth: [],
      definitionId: 'watermelon-object-provider',
      visibility: 'restricted',
      access: 'granted',
      key: 'watermelon-object-provider'
    }
  },
  notFound: {
    meta: {
      visibility: 'not_found',
      access: 'forbidden',
      auth: [],
      definitionId: 'd1',
      key: 'object-provider'
    },
    data: {
      '@context': {
        '@vocab': 'https://www.w3.org/ns/activitystreams#',
        atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
        schema: 'http://schema.org/'
      },
      '@type': 'Object',
      generator: {
        '@type': 'Application',
        name: 'Google',
        icon: {
          '@type': 'Image',
          url: iconGoogleDrive
        }
      },
      name: 'I love cheese',
      url: 'https://some.url'
    }
  },
  forbidden: {
    meta: {
      visibility: 'restricted',
      access: 'forbidden',
      auth: [{
        key: 'some-flow',
        displayName: 'Flow',
        url: 'https://outbound-auth/flow'
      }],
      definitionId: 'd1',
      key: 'object-provider'
    },
    data: {
      '@context': {
        '@vocab': 'https://www.w3.org/ns/activitystreams#',
        atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
        schema: 'http://schema.org/'
      },
      '@type': 'Object',
      generator: {
        '@type': 'Application',
        name: 'Google',
        icon: {
          '@type': 'Image',
          url: iconGoogleDrive
        }
      },
      url: 'https://some.url'
    }
  },
  unresolved: function unresolved() {
    var accessType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'FORBIDDEN';
    var visibility = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'not_found';
    return {
      meta: {
        auth: [],
        definitionId: 'jira-object-provider',
        product: 'jira',
        visibility: visibility,
        access: 'forbidden',
        resourceType: 'issue',
        category: 'object',
        tenantId: 'tenant-id',
        key: 'jira-object-provider',
        requestAccess: {
          accessType: accessType,
          cloudId: 'cloud-id'
        }
      },
      data: {
        '@context': {
          '@vocab': 'https://www.w3.org/ns/activitystreams#',
          atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
          schema: 'http://schema.org/'
        },
        generator: {
          '@type': 'Application',
          '@id': 'https://www.atlassian.com/#Jira',
          name: 'Jira',
          icon: {
            '@type': 'Image',
            url: 'https://icon-url'
          },
          image: {
            '@type': 'Image',
            url: imageForbiddenJiraEmbed
          }
        },
        image: {
          '@type': 'Image',
          url: forbiddenJira
        },
        url: 'https://site.atlassian.net/browse/key-1',
        '@type': ['atlassian:Task', 'Object']
      }
    };
  },
  unauthorized: function unauthorized(url) {
    var key = 'google-object-provider';
    var name = 'Google';
    var icon = iconGoogleDrive;
    var image = gdriveUnauthImage;
    if (url.includes('figma.com')) {
      key = 'figma-object-provider';
      name = 'Figma';
      icon = iconFigma;
      image = figmaUnauthImage;
    } else if (url.includes('dropbox.com')) {
      key = 'dropbox-object-provider';
      name = 'Dropbox';
      icon = iconDropbox;
      image = undefined;
    } else if (url.includes('onedrive.live.com')) {
      key = 'onedrive-object-provider';
      name = 'OneDrive';
      icon = iconOneDrive;
      image = onedriveUnauthImage;
    } else if (url.includes('.slack.com')) {
      key = 'slack-object-provider';
      name = 'Slack';
      icon = iconSlack;
      image = slackUnauthImage;
    }
    return {
      meta: {
        access: 'unauthorized',
        visibility: 'restricted',
        auth: [{
          key: 'some-flow',
          displayName: 'Flow',
          url: 'https://outbound-auth/flow'
        }],
        definitionId: 'd1',
        key: key,
        resourceType: 'file'
      },
      data: {
        '@context': {
          '@vocab': 'https://www.w3.org/ns/activitystreams#',
          atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
          schema: 'http://schema.org/'
        },
        '@type': 'Object',
        generator: _objectSpread({
          '@type': 'Application',
          name: name
        }, icon ? {
          icon: {
            '@type': 'Image',
            url: icon
          }
        } : {}),
        url: url,
        image: image
      }
    };
  }
};
var resolve = function resolve(url, response, overrideData) {
  return Promise.resolve(_objectSpread(_objectSpread({}, response), {}, {
    data: _objectSpread(_objectSpread(_objectSpread({}, response.data), overrideData), {}, {
      url: url
    })
  }));
};
export var ResolvedClientUrl = atlasProjectUrl;
export var ResolvedClientUrlNoPreview = "".concat(atlasProjectUrl, "/no-preview");
export var ResolvedClientEmbedUrl = YouTubeVideoUrl;
export var ResolvedClientEmbedInteractiveUrl = GoogleDocUrl;
export var ResolvedClientWithLongTitleUrl = "".concat(atlasProjectUrl, "/long-title");
export var ResolvedClientWithTextHighlightInTitleUrl = "".concat(atlasProjectUrl, "/text-highlight-title");
export var ResolvedClientProfileUrl = "".concat(atlasProjectUrl, "/profile-url");
var ICON_TEST_BASE = 'https://icon-test';
var iconTestMeta = {
  auth: [],
  definitionId: 'icon-test-provider',
  visibility: 'public',
  access: 'granted',
  key: 'icon-test-provider'
};
var iconTestContext = {
  '@vocab': 'https://www.w3.org/ns/activitystreams#',
  atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
  schema: 'http://schema.org/'
};
var iconTestDefaultGenerator = {
  '@type': 'Application',
  name: 'Acme Link Sandbox',
  icon: {
    '@type': 'Image',
    url: iconGoogleDrive
  }
};
var iconTestSharedFields = {
  preview: {
    '@type': 'Link',
    href: 'https://icon-test.example/assets/preview-placeholder'
  },
  updated: '2025-11-18T14:22:00.000Z',
  attributedTo: [{
    '@type': 'Person',
    icon: avatar3,
    name: 'Jordan Rivers'
  }]
};
var makeIconTestResponse = function makeIconTestResponse(url, type, dataOverrides) {
  var generator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : iconTestDefaultGenerator;
  return {
    meta: iconTestMeta,
    data: _objectSpread(_objectSpread({
      '@context': iconTestContext,
      '@type': type,
      url: url
    }, iconTestSharedFields), {}, {
      generator: generator
    }, dataOverrides)
  };
};
var confluenceGenerator = {
  '@type': 'Application',
  '@id': 'https://www.atlassian.com/#Confluence',
  name: 'Confluence',
  icon: {
    '@type': 'Image',
    url: image2
  }
};
var jiraGenerator = {
  '@type': 'Application',
  '@id': 'https://www.atlassian.com/#Jira',
  name: 'Jira',
  icon: {
    '@type': 'Image',
    url: image2
  }
};
var iconTestResponseMap = (_iconTestResponseMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconTestResponseMap, "".concat(ICON_TEST_BASE, "/url-icon"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/url-icon"), 'Document', {
  name: 'Quarterly roadmap — icon resolved from explicit document image URL',
  summary: 'This mock prioritises the linked `icon` URL over file format and provider artwork, so you can verify URL-based icons without relying on generator metadata.',
  icon: {
    '@type': 'Image',
    url: iconGoogleDrive
  }
})), "".concat(ICON_TEST_BASE, "/file-format"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/file-format"), 'Document', {
  name: 'Field photos — JPEG archive (file-format icon path)',
  summary: 'No dedicated thumbnail URL is supplied; the smart card should derive a file-type glyph from `schema:fileFormat` while still showing title and summary in the resolved layout.',
  'schema:fileFormat': 'image/jpeg'
})), "".concat(ICON_TEST_BASE, "/provider-only"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/provider-only"), 'Object', {
  name: 'Partner CRM record #88421 (provider icon fallback)',
  summary: 'A generic object with no per-resource icon or file format hint. The inline card should fall back to the upstream application icon from `generator`, matching the prioritisation order used in production resolver payloads.'
})), "".concat(ICON_TEST_BASE, "/blog"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/blog"), 'schema:BlogPosting', {
  name: 'Engineering blog: shipping safer deploys with progressive rollouts',
  summary: 'Long-form `schema:BlogPosting` content used to exercise blog-specific iconography alongside a full summary block, attribution, and preview link metadata.'
})), "".concat(ICON_TEST_BASE, "/digital-doc-confluence"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/digital-doc-confluence"), 'schema:DigitalDocument', {
  name: 'Confluence live doc — collaborative spec (digital document + Confluence generator)',
  summary: 'Represents a live Confluence-backed digital document. Useful for validating Confluence generator detection, co-editing affordances in block/embed cards, and the Confluence-specific icon branch.'
}, confluenceGenerator)), "".concat(ICON_TEST_BASE, "/digital-doc"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/digital-doc"), 'schema:DigitalDocument', {
  name: 'Shared playbook — Google Doc export (digital document, non-Confluence)',
  summary: 'A vendor-neutral `schema:DigitalDocument` with rich text summary so block and inline appearances still read well when the resource is not tied to Atlassian generator metadata.'
})), "".concat(ICON_TEST_BASE, "/template"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/template"), 'atlassian:Template', {
  name: 'Sprint retrospective template (Confluence)',
  summary: 'Pre-built retrospective structure with prompts for what went well, what to improve, and action items. Exercises `atlassian:Template` typing and template icon mapping in the extractor pipeline.'
})), "".concat(ICON_TEST_BASE, "/pull-request"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/pull-request"), 'atlassian:SourceCodePullRequest', {
  name: 'PR #482: harden OAuth token refresh + add integration tests',
  summary: 'Source pull request payload with a realistic title and description span. Helps validate pull-request icons, status chips, and how long metadata wraps inside block and embed frames.',
  'atlassian:state': {
    '@type': 'Object',
    name: 'Open',
    appearance: 'information'
  }
})), "".concat(ICON_TEST_BASE, "/jira-bug"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/jira-bug"), ['atlassian:Task', 'Object'], {
  name: 'NAV-2048: Inline card icons drift when priority chip is present',
  summary: 'Steps to reproduce: open inline smart link in the editor, toggle reduced motion, resize panel. Expected: priority and issue type icons stay aligned. Actual: glyph baseline shifts by 2px.',
  'atlassian:taskType': {
    '@type': 'Object',
    '@id': 'https://www.atlassian.com/taskType#JiraBug',
    name: 'Bug'
  },
  'atlassian:state': {
    '@type': 'Object',
    name: 'In progress',
    appearance: 'information'
  }
}, jiraGenerator)), "".concat(ICON_TEST_BASE, "/task-default"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/task-default"), ['atlassian:Task', 'Object'], {
  name: 'LP-901: Document smart-link icon precedence for QA fixtures',
  summary: 'Tracker work item without a specialised `atlassian:taskType` id, so the card should use the default task/issue iconography while still rendering summary and workflow state from JSON-LD.',
  'atlassian:state': {
    '@type': 'Object',
    name: 'To do',
    appearance: 'default'
  }
})), _defineProperty(_iconTestResponseMap, "".concat(ICON_TEST_BASE, "/confluence-doc"), makeIconTestResponse("".concat(ICON_TEST_BASE, "/confluence-doc"), 'Document', {
  name: 'Runbook: restoring Media Services after a regional failover',
  summary: 'Operational checklist covering traffic drain, cache invalidation, and comms templates. Uses a Confluence `generator` block so provider-specific document icons and titles can be regression-tested together.'
}, confluenceGenerator)));
export var iconTestUrls = Object.keys(iconTestResponseMap);
export var MockCardClient = /*#__PURE__*/function (_CardClient) {
  function MockCardClient() {
    _classCallCheck(this, MockCardClient);
    return _callSuper(this, MockCardClient, arguments);
  }
  _inherits(MockCardClient, _CardClient);
  return _createClass(MockCardClient, [{
    key: "prefetchData",
    value: function prefetchData(url) {
      return Promise.resolve(undefined);
    }
  }]);
}(CardClient);
export var ResolvedClient = /*#__PURE__*/function (_MockCardClient) {
  function ResolvedClient() {
    _classCallCheck(this, ResolvedClient);
    return _callSuper(this, ResolvedClient, arguments);
  }
  _inherits(ResolvedClient, _MockCardClient);
  return _createClass(ResolvedClient, [{
    key: "fetchData",
    value: function fetchData(url) {
      var iconTestResponse = iconTestResponseMap[url];
      if (iconTestResponse) {
        return Promise.resolve(iconTestResponse);
      }
      switch (url) {
        case ResolvedClientEmbedUrl:
          return resolve(url, YouTubeVideo);
        case ResolvedClientEmbedInteractiveUrl:
          return resolve(url, GoogleDoc);
        case ResolvedClientWithLongTitleUrl:
          return resolve(url, AtlasProject, {
            name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis id lectus lorem. Phasellus luctus vulputate diam vitae sagittis. Fusce laoreet pulvinar dapibus.'
          });
        case ResolvedClientWithTextHighlightInTitleUrl:
          return resolve(url, AtlasProject, {
            name: "".concat(AtlasProject.data.name, " | :~:text=highlight this")
          });
        case ResolvedClientUrlNoPreview:
          return resolve(url, AtlasProjectNoPreview);
        case ResolvedClientProfileUrl:
          return resolve(url, ProfileObject);
      }
      var response = _objectSpread({}, AtlasProject);
      response.data.preview.href = overrideEmbedContent;
      return Promise.resolve(response);
    }
  }]);
}(MockCardClient);
export var ResolvingClientUrl = 'https://resolving-link';
export var ResolvingClient = /*#__PURE__*/function (_MockCardClient2) {
  function ResolvingClient() {
    _classCallCheck(this, ResolvingClient);
    return _callSuper(this, ResolvingClient, arguments);
  }
  _inherits(ResolvingClient, _MockCardClient2);
  return _createClass(ResolvingClient, [{
    key: "fetchData",
    value: function fetchData() {
      return new Promise(function () {
        // resolve() never get called to keep status as resolving forever
      });
    }
  }]);
}(MockCardClient);
export var ResolvedClientWithDelay = /*#__PURE__*/function (_MockCardClient3) {
  function ResolvedClientWithDelay() {
    _classCallCheck(this, ResolvedClientWithDelay);
    return _callSuper(this, ResolvedClientWithDelay, arguments);
  }
  _inherits(ResolvedClientWithDelay, _MockCardClient3);
  return _createClass(ResolvedClientWithDelay, [{
    key: "fetchData",
    value: function fetchData() {
      var response = _objectSpread({}, AtlasProject);
      return new Promise(function (resolve) {
        return setTimeout(function () {
          return resolve(response);
        }, 2000);
      });
    }
  }]);
}(MockCardClient);
export var ErroredClient = /*#__PURE__*/function (_MockCardClient4) {
  function ErroredClient() {
    _classCallCheck(this, ErroredClient);
    return _callSuper(this, ErroredClient, arguments);
  }
  _inherits(ErroredClient, _MockCardClient4);
  return _createClass(ErroredClient, [{
    key: "fetchData",
    value: function fetchData(url) {
      return Promise.reject("Can't resolve from ".concat(url));
    }
  }]);
}(MockCardClient);

// "visibility": "restricted",
// "access": "forbidden",
export var ForbiddenClient = /*#__PURE__*/function (_MockCardClient5) {
  function ForbiddenClient() {
    _classCallCheck(this, ForbiddenClient);
    return _callSuper(this, ForbiddenClient, arguments);
  }
  _inherits(ForbiddenClient, _MockCardClient5);
  return _createClass(ForbiddenClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.forbidden);
    }
  }]);
}(MockCardClient);

// "visibility": "restricted",
// "access": "forbidden",
// "accessType": "ACCESS_EXISTS",
export var ForbiddenWithObjectRequestAccessClient = /*#__PURE__*/function (_MockCardClient6) {
  function ForbiddenWithObjectRequestAccessClient() {
    _classCallCheck(this, ForbiddenWithObjectRequestAccessClient);
    return _callSuper(this, ForbiddenWithObjectRequestAccessClient, arguments);
  }
  _inherits(ForbiddenWithObjectRequestAccessClient, _MockCardClient6);
  return _createClass(ForbiddenWithObjectRequestAccessClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('ACCESS_EXISTS', 'restricted'));
    }
  }]);
}(MockCardClient);

// "visibility": "not_found",
// "access": "forbidden",
// "accessType": "DENIED_REQUEST_EXISTS",
export var ForbiddenWithSiteDeniedRequestClient = /*#__PURE__*/function (_MockCardClient7) {
  function ForbiddenWithSiteDeniedRequestClient() {
    _classCallCheck(this, ForbiddenWithSiteDeniedRequestClient);
    return _callSuper(this, ForbiddenWithSiteDeniedRequestClient, arguments);
  }
  _inherits(ForbiddenWithSiteDeniedRequestClient, _MockCardClient7);
  return _createClass(ForbiddenWithSiteDeniedRequestClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('DENIED_REQUEST_EXISTS', 'not_found'));
    }
  }]);
}(MockCardClient);

// "visibility": "not_found",
// "access": "forbidden",
// "accessType": "DIRECT_ACCESS",
export var ForbiddenWithSiteDirectAccessClient = /*#__PURE__*/function (_MockCardClient8) {
  function ForbiddenWithSiteDirectAccessClient() {
    _classCallCheck(this, ForbiddenWithSiteDirectAccessClient);
    return _callSuper(this, ForbiddenWithSiteDirectAccessClient, arguments);
  }
  _inherits(ForbiddenWithSiteDirectAccessClient, _MockCardClient8);
  return _createClass(ForbiddenWithSiteDirectAccessClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('DIRECT_ACCESS', 'not_found'));
    }
  }]);
}(MockCardClient);

// "visibility": "not_found",
// "access": "forbidden",
// "accessType": "FORBIDDEN",
export var ForbiddenWithSiteForbiddenClient = /*#__PURE__*/function (_MockCardClient9) {
  function ForbiddenWithSiteForbiddenClient() {
    _classCallCheck(this, ForbiddenWithSiteForbiddenClient);
    return _callSuper(this, ForbiddenWithSiteForbiddenClient, arguments);
  }
  _inherits(ForbiddenWithSiteForbiddenClient, _MockCardClient9);
  return _createClass(ForbiddenWithSiteForbiddenClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('FORBIDDEN', 'not_found'));
    }
  }]);
}(MockCardClient);

// "visibility": "not_found",
// "access": "forbidden",
// "accessType": "PENDING_REQUEST_EXISTS",
export var ForbiddenWithSitePendingRequestClient = /*#__PURE__*/function (_MockCardClient0) {
  function ForbiddenWithSitePendingRequestClient() {
    _classCallCheck(this, ForbiddenWithSitePendingRequestClient);
    return _callSuper(this, ForbiddenWithSitePendingRequestClient, arguments);
  }
  _inherits(ForbiddenWithSitePendingRequestClient, _MockCardClient0);
  return _createClass(ForbiddenWithSitePendingRequestClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('PENDING_REQUEST_EXISTS', 'not_found'));
    }
  }]);
}(MockCardClient);

// "visibility": "not_found",
// "access": "forbidden",
// "accessType": "REQUEST_ACCESS",
export var ForbiddenWithSiteRequestAccessClient = /*#__PURE__*/function (_MockCardClient1) {
  function ForbiddenWithSiteRequestAccessClient() {
    _classCallCheck(this, ForbiddenWithSiteRequestAccessClient);
    return _callSuper(this, ForbiddenWithSiteRequestAccessClient, arguments);
  }
  _inherits(ForbiddenWithSiteRequestAccessClient, _MockCardClient1);
  return _createClass(ForbiddenWithSiteRequestAccessClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('REQUEST_ACCESS', 'not_found'));
    }
  }]);
}(MockCardClient);

// "visibility": "restricted",
// "access": "forbidden",
export var ForbiddenClientWithNoIcon = /*#__PURE__*/function (_MockCardClient10) {
  function ForbiddenClientWithNoIcon() {
    _classCallCheck(this, ForbiddenClientWithNoIcon);
    return _callSuper(this, ForbiddenClientWithNoIcon, arguments);
  }
  _inherits(ForbiddenClientWithNoIcon, _MockCardClient10);
  return _createClass(ForbiddenClientWithNoIcon, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(_objectSpread(_objectSpread({}, mocks.forbidden), {}, {
        data: _objectSpread(_objectSpread({}, mocks.forbidden.data), {}, {
          generator: {
            name: 'Provider'
          }
        })
      }));
    }
  }]);
}(MockCardClient);

// visibility: 'not_found',
// access: 'forbidden',
export var NotFoundClient = /*#__PURE__*/function (_MockCardClient11) {
  function NotFoundClient() {
    _classCallCheck(this, NotFoundClient);
    return _callSuper(this, NotFoundClient, arguments);
  }
  _inherits(NotFoundClient, _MockCardClient11);
  return _createClass(NotFoundClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.notFound);
    }
  }]);
}(MockCardClient);

// "visibility": "not_found",
// "access": "forbidden",
// "accessType": "ACCESS_EXISTS",
export var NotFoundWithSiteAccessExistsClient = /*#__PURE__*/function (_MockCardClient12) {
  function NotFoundWithSiteAccessExistsClient() {
    _classCallCheck(this, NotFoundWithSiteAccessExistsClient);
    return _callSuper(this, NotFoundWithSiteAccessExistsClient, arguments);
  }
  _inherits(NotFoundWithSiteAccessExistsClient, _MockCardClient12);
  return _createClass(NotFoundWithSiteAccessExistsClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(mocks.unresolved('ACCESS_EXISTS', 'not_found'));
    }
  }]);
}(MockCardClient);
export var NotFoundWithNoIconClient = /*#__PURE__*/function (_MockCardClient13) {
  function NotFoundWithNoIconClient() {
    _classCallCheck(this, NotFoundWithNoIconClient);
    return _callSuper(this, NotFoundWithNoIconClient, arguments);
  }
  _inherits(NotFoundWithNoIconClient, _MockCardClient13);
  return _createClass(NotFoundWithNoIconClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(_objectSpread(_objectSpread({}, mocks.notFound), {}, {
        data: _objectSpread(_objectSpread({}, mocks.forbidden.data), {}, {
          generator: {
            name: 'Provider'
          }
        })
      }));
    }
  }]);
}(MockCardClient);
export var UnAuthClient = /*#__PURE__*/function (_MockCardClient14) {
  function UnAuthClient() {
    _classCallCheck(this, UnAuthClient);
    return _callSuper(this, UnAuthClient, arguments);
  }
  _inherits(UnAuthClient, _MockCardClient14);
  return _createClass(UnAuthClient, [{
    key: "fetchData",
    value: function fetchData(url) {
      return Promise.resolve(mocks.unauthorized(url));
    }
  }]);
}(MockCardClient);
export var UnAuthClientWithProviderImage = /*#__PURE__*/function (_MockCardClient15) {
  function UnAuthClientWithProviderImage() {
    _classCallCheck(this, UnAuthClientWithProviderImage);
    return _callSuper(this, UnAuthClientWithProviderImage, arguments);
  }
  _inherits(UnAuthClientWithProviderImage, _MockCardClient15);
  return _createClass(UnAuthClientWithProviderImage, [{
    key: "fetchData",
    value: function fetchData(url) {
      var unauthorizedResponse = mocks.unauthorized(url);
      unauthorizedResponse.data.generator.image = {
        '@type': 'Image',
        url: iconGoogleDrive
      };
      return Promise.resolve(unauthorizedResponse);
    }
  }]);
}(MockCardClient);
export var UnAuthClientWithNoAuthFlow = /*#__PURE__*/function (_MockCardClient16) {
  function UnAuthClientWithNoAuthFlow() {
    _classCallCheck(this, UnAuthClientWithNoAuthFlow);
    return _callSuper(this, UnAuthClientWithNoAuthFlow, arguments);
  }
  _inherits(UnAuthClientWithNoAuthFlow, _MockCardClient16);
  return _createClass(UnAuthClientWithNoAuthFlow, [{
    key: "fetchData",
    value: function fetchData(url) {
      var unauthorizedResponse = mocks.unauthorized(url);
      unauthorizedResponse.meta.auth = [];
      return Promise.resolve(unauthorizedResponse);
    }
  }]);
}(MockCardClient);
export var UnAuthClientWithNoIcon = /*#__PURE__*/function (_MockCardClient17) {
  function UnAuthClientWithNoIcon() {
    _classCallCheck(this, UnAuthClientWithNoIcon);
    return _callSuper(this, UnAuthClientWithNoIcon, arguments);
  }
  _inherits(UnAuthClientWithNoIcon, _MockCardClient17);
  return _createClass(UnAuthClientWithNoIcon, [{
    key: "fetchData",
    value: function fetchData(url) {
      var unauthorizedResponse = mocks.unauthorized(url);
      unauthorizedResponse.meta.key = 'some-unknown-provider';
      unauthorizedResponse.data.generator = {
        name: 'Provider',
        '@type': 'Application',
        icon: undefined
      };
      return Promise.resolve(unauthorizedResponse);
    }
  }]);
}(MockCardClient);
export var UnicornResolvedClient = /*#__PURE__*/function (_CardClient2) {
  function UnicornResolvedClient() {
    _classCallCheck(this, UnicornResolvedClient);
    return _callSuper(this, UnicornResolvedClient, arguments);
  }
  _inherits(UnicornResolvedClient, _CardClient2);
  return _createClass(UnicornResolvedClient, [{
    key: "fetchData",
    value: function fetchData() {
      return Promise.resolve(unicornResponse);
    }
  }]);
}(CardClient);