text: "use strict";
  /**
   * @file createIcon.ts
   * @Copyright (c) Microsoft Corporation.  All rights reserved.
   *
   * Creates an package's icon information
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  const XmlGenerator = require("xml");
  const uuid = require("uuid");
  const createRelationshipsXml_1 = require("./createRelationshipsXml");
  const serializationOptions_1 = require("./serializationOptions");
  function createIcon(iconPath) {
      if (!iconPath) {
          return;
      }
      const config = {
          filename: `${iconPath}.config.xml`,
          contents: Buffer.from(XmlGenerator({
              AppPartConfig: [
                  {
                      _attr: {
                          xmlns: 'http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration'
                      }
                  },
                  {
                      Id: uuid.v4()
                  }
              ]
          }, serializationOptions_1.default))
      };
      const rels = createRelationshipsXml_1.default(iconPath, [
          {
              type: 'partconfiguration',
              target: `${iconPath}.config.xml`
          }
      ]);
      return {
          path: iconPath,
          config: config,
          relationships: rels
      };
  }
  exports.default = createIcon;
  //# sourceMappingURL=createIcon.js.map