text: /**
   * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
   * @version v24.1.0
   * @link http://www.ag-grid.com/
   * @license MIT
   */
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = function (d, b) {
          extendStatics = Object.setPrototypeOf ||
              ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
              function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
          return extendStatics(d, b);
      };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  import { Bean } from "./context/context";
  import { BeanStub } from "./context/beanStub";
  var LINE_SEPARATOR = '\r\n';
  var XmlFactory = /** @class */ (function (_super) {
      __extends(XmlFactory, _super);
      function XmlFactory() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      XmlFactory.prototype.createXml = function (xmlElement, booleanTransformer) {
          var _this = this;
          var props = '';
          if (xmlElement.properties) {
              if (xmlElement.properties.prefixedAttributes) {
                  xmlElement.properties.prefixedAttributes.forEach(function (prefixedSet) {
                      Object.keys(prefixedSet.map).forEach(function (key) {
                          props += _this.returnAttributeIfPopulated(prefixedSet.prefix + key, prefixedSet.map[key], booleanTransformer);
                      });
                  });
              }
              if (xmlElement.properties.rawMap) {
                  Object.keys(xmlElement.properties.rawMap).forEach(function (key) {
                      props += _this.returnAttributeIfPopulated(key, xmlElement.properties.rawMap[key], booleanTransformer);
                  });
              }
          }
          var result = '<' + xmlElement.name + props;
          if (!xmlElement.children && xmlElement.textNode == null) {
              return result + '/>' + LINE_SEPARATOR;
          }
          if (xmlElement.textNode != null) {
              return result + '>' + xmlElement.textNode + '</' + xmlElement.name + '>' + LINE_SEPARATOR;
          }
          result += '>' + LINE_SEPARATOR;
          xmlElement.children.forEach(function (it) {
              result += _this.createXml(it, booleanTransformer);
          });
          return result + '</' + xmlElement.name + '>' + LINE_SEPARATOR;
      };
      XmlFactory.prototype.returnAttributeIfPopulated = function (key, value, booleanTransformer) {
          if (!value) {
              return '';
          }
          var xmlValue = value;
          if ((typeof (value) === 'boolean')) {
              if (booleanTransformer) {
                  xmlValue = booleanTransformer(value);
              }
          }
          return " " + key + "=\"" + xmlValue + "\"";
      };
      XmlFactory = __decorate([
          Bean('xmlFactory')
      ], XmlFactory);
      return XmlFactory;
  }(BeanStub));
  export { XmlFactory };
  