1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4  value: true
5});
6exports.getUsesNonExemptEncryption = getUsesNonExemptEncryption;
7exports.setUsesNonExemptEncryption = setUsesNonExemptEncryption;
8exports.withUsesNonExemptEncryption = void 0;
9
10function _iosPlugins() {
11  const data = require("../plugins/ios-plugins");
12
13  _iosPlugins = function () {
14    return data;
15  };
16
17  return data;
18}
19
20const withUsesNonExemptEncryption = (0, _iosPlugins().createInfoPlistPluginWithPropertyGuard)(setUsesNonExemptEncryption, {
21  infoPlistProperty: 'ITSAppUsesNonExemptEncryption',
22  expoConfigProperty: 'ios.config.usesNonExemptEncryption'
23}, 'withUsesNonExemptEncryption');
24exports.withUsesNonExemptEncryption = withUsesNonExemptEncryption;
25
26function getUsesNonExemptEncryption(config) {
27  var _config$ios$config$us, _config$ios, _config$ios$config;
28
29  return (_config$ios$config$us = config === null || config === void 0 ? void 0 : (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : (_config$ios$config = _config$ios.config) === null || _config$ios$config === void 0 ? void 0 : _config$ios$config.usesNonExemptEncryption) !== null && _config$ios$config$us !== void 0 ? _config$ios$config$us : null;
30}
31
32function setUsesNonExemptEncryption(config, {
33  ITSAppUsesNonExemptEncryption,
34  ...infoPlist
35}) {
36  const usesNonExemptEncryption = getUsesNonExemptEncryption(config); // Make no changes if the key is left blank
37
38  if (usesNonExemptEncryption === null) {
39    return infoPlist;
40  }
41
42  return { ...infoPlist,
43    ITSAppUsesNonExemptEncryption: usesNonExemptEncryption
44  };
45}
46//# sourceMappingURL=UsesNonExemptEncryption.js.map