define(["exports", "../core/defaults", "../core/linter", "../core/linter-rules/privsec-section"], function (_exports, _defaults, _linter, _privsecSection) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.run = run;
  _exports.name = void 0;
  _linter = _interopRequireDefault(_linter);

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  /**
   * Sets the defaults for Geonovum documents
   */
  const name = "geonovum/defaults";
  _exports.name = name;

  _linter.default.register(_privsecSection.rule);

  const licenses = new Map([["cc0", {
    name: "Creative Commons 0 Public Domain Dedication",
    short: "CC0",
    url: "https://creativecommons.org/publicdomain/zero/1.0/"
  }], ["cc-by", {
    name: "Creative Commons Attribution 4.0 International Public License",
    short: "CC-BY",
    url: "https://creativecommons.org/licenses/by/4.0/legalcode"
  }], ["cc-by-nd", {
    name: "Creative Commons Attribution-NoDerivatives 4.0 International Public License",
    short: "CC-BY-ND",
    url: "https://creativecommons.org/licenses/by-nd/4.0/legalcode.nl"
  }]]);
  const geonovumDefaults = {
    lint: {
      "privsec-section": true
    },
    doJsonLd: true,
    license: "cc-by",
    specStatus: "GN-BASIS",
    logos: [{
      src: "https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg",
      alt: "Geonovum",
      id: "Geonovum",
      height: 67,
      width: 132,
      url: "https://www.geonovum.nl/"
    }]
  };

  function computeProps(conf) {
    return {
      isCCBY: conf.license === "cc-by",
      licenseInfo: licenses.get(conf.license),
      isBasic: conf.specStatus === "GN-BASIS",
      isRegular: conf.specStatus === "GN-BASIS"
    };
  }

  function run(conf) {
    // assign the defaults
    const lint = conf.lint === false ? false : _objectSpread({}, _defaults.coreDefaults.lint, {}, geonovumDefaults.lint, {}, conf.lint);
    Object.assign(conf, _objectSpread({}, _defaults.coreDefaults, {}, geonovumDefaults, {}, conf, {
      lint
    })); // computed properties

    Object.assign(conf, computeProps(conf));
  }
});
//# sourceMappingURL=defaults.js.map