fcf.module({
  name:         "fcfManagement:templates/pages/system/html-header+body.wrapper.js",
  dependencies: ["fcf:NClient/Wrapper.js"],
  lazy:         [],
  module: function(Wrapper){
    return class BodyWrapperEx extends Wrapper{
      
      constructor(a_initializeOptions){
        super(a_initializeOptions);
      }

      onArg(a_argName, a_value, a_editor, a_ignoreRedrawing, a_isInnerCall) {
        this.getChild("save").setArg("enable", true);
        this.getChild("cancel").setArg("enable", true);
      }

      onCancel(){
        this.reload();
      }

      async onSave(){
        this.lock();
        this.send({header: this.getArg("header")})
        .finally(()=>{
          this.unlock();
        })
      }

    };
  }
});
