fcf.module({
  name: "fcfManagement:templates/pages/translations/settings-tab.wrapper.js",
  dependencies: ["fcf:NClient/Wrapper.js"],
  module: function(Wrapper){
    return class WrapperEx extends Wrapper{
      
      constructor(a_initializeOptions){
        super(a_initializeOptions);
      }

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

      onSave(){
        this.getChild("save").setArg("enable", false);
        this.getChild("cancel").setArg("enable", false);
        this.send(this.getArgs())
        .then(()=>{
          location.reload();
        })
        .catch(()=>{
          this.getChild("save").setArg("enable", true);
          this.getChild("cancel").setArg("enable", true);
        })
      }

      onCancel(){
        this.reload();
      }
    };
  }
});
