text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.setName = exports.setDisplayName = exports.getName = exports.withName = exports.withDisplayName = void 0;
  const ios_plugins_1 = require("../plugins/ios-plugins");
  exports.withDisplayName = ios_plugins_1.createInfoPlistPlugin(setDisplayName, 'withDisplayName');
  exports.withName = ios_plugins_1.createInfoPlistPlugin(setName, 'withName');
  function getName(config) {
      return typeof config.name === 'string' ? config.name : null;
  }
  exports.getName = getName;
  /**
   * CFBundleDisplayName is used for most things: the name on the home screen, in
   * notifications, and others.
   */
  function setDisplayName(configOrName, { CFBundleDisplayName, ...infoPlist }) {
      let name = null;
      if (typeof configOrName === 'string') {
          name = configOrName;
      }
      else {
          name = getName(configOrName);
      }
      if (!name) {
          return infoPlist;
      }
      return {
          ...infoPlist,
          CFBundleDisplayName: name,
      };
  }
  exports.setDisplayName = setDisplayName;
  /**
   * CFBundleName is recommended to be 16 chars or less and is used in lists, eg:
   * sometimes on the App Store
   */
  function setName(config, { CFBundleName, ...infoPlist }) {
      const name = getName(config);
      if (!name) {
          return infoPlist;
      }
      return {
          ...infoPlist,
          CFBundleName: name,
      };
  }
  exports.setName = setName;
  //# sourceMappingURL=Name.js.map