"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.normalizeUrl = normalizeUrl;
var _adfSchema = require("@atlaskit/adf-schema");
/**
 * Adds protocol to url if needed.
 */
function normalizeUrl(url) {
  if (!url) {
    return '';
  }
  if ((0, _adfSchema.isSafeUrl)(url)) {
    return url;
  }
  return (0, _adfSchema.normalizeUrl)(url);
}