import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
export var ANALYTICS_CHANNEL = 'media';
export var context = {
  componentName: 'smart-cards',
  packageName: "@atlaskit/smart-card",
  packageVersion: "0.0.0-development"
};
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
  return TrackQuickActionType;
}({});
export var TrackQuickActionFailureReason = /*#__PURE__*/function (TrackQuickActionFailureReason) {
  TrackQuickActionFailureReason["PermissionError"] = "PermissionError";
  TrackQuickActionFailureReason["ValidationError"] = "ValidationError";
  TrackQuickActionFailureReason["UnknownError"] = "UnknownError";
  return TrackQuickActionFailureReason;
}({});
export var SmartLinkEvents = /*#__PURE__*/function () {
  function SmartLinkEvents() {
    _classCallCheck(this, SmartLinkEvents);
  }
  return _createClass(SmartLinkEvents, [{
    key: "insertSmartLink",
    value: function insertSmartLink(url, type, createAnalyticsEvent) {
      fireSmartLinkEvent({
        action: 'inserted',
        actionSubject: 'smartLink',
        eventType: 'track',
        attributes: {
          type: type
        },
        nonPrivacySafeAttributes: {
          domainName: url
        }
      }, createAnalyticsEvent);
    }
  }]);
}();
export var fireSmartLinkEvent = function fireSmartLinkEvent(payload, createAnalyticsEvent) {
  if (createAnalyticsEvent) {
    createAnalyticsEvent(payload).fire(ANALYTICS_CHANNEL);
  }
};