import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from './constants';
export function isTextAtPos(pos) {
  return function (state) {
    var node = state.doc.nodeAt(pos);
    return !!node && node.isText;
  };
}
export function isLinkAtPos(pos) {
  return function (state) {
    var node = state.doc.nodeAt(pos);
    return !!node && !!state.schema.marks.link.isInSet(node.marks);
  };
}
export var getLinkPreferencesURLFromENV = function getLinkPreferencesURLFromENV() {
  if (process.env.NODE_ENV === 'production' && process.env.CLOUD_ENV === 'staging') {
    // only a production CLOUD_ENV staging environment has a different link preferences URL
    return stagingLinkPreferencesUrl;
  } else if (process.env.NODE_ENV === 'production') {
    return productionLinkPreferencesUrl;
  } else {
    return stagingLinkPreferencesUrl;
  }
};