import { useMemo } from 'react';

// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
import uuid from 'uuid';
import { useSmartCardActions as useLinkActions } from '../actions';
/**
 * Exposes a programmatic way to reload the data being used to render a Smart Link.
 * @param
 * @returns
 */
export function useSmartLinkReload(_ref) {
  var url = _ref.url;
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
  var id = useMemo(function () {
    return uuid();
  }, []);
  var linkActions = useLinkActions(id, url);
  return linkActions.reload;
}