import { useMemo } from 'react';
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
import { SmartLinkEvents } from '../../utils/analytics/analytics';
export function useSmartLinkEvents() {
  /**
   * this utility maybe extended in the future to include
   * more contextual info about SLs
   */
  var events = useMemo(function () {
    return new SmartLinkEvents();
  }, []);
  return events;
}
export function useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) {
  var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
    createAnalyticsEvent = _useAnalyticsEventsNe.createAnalyticsEvent;
  return function () {
    var smartlinkClickAnalyticsEvent = createAnalyticsEvent({
      action: 'clicked',
      actionSubject: 'smartLink',
      actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
      eventType: 'ui',
      attributes: {
        eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
        firstPartyIdentifier: firstPartyIdentifier
      },
      nonPrivacySafeAttributes: {
        thirdPartyARI: thirdPartyARI
      }
    });
    smartlinkClickAnalyticsEvent.fire('media');
  };
}