fcf.module({
  name: "fcfControls:templates/text-edit.wrapper.js",
  dependencies: ["fcfControls:templates/view.wrapper.js"],
  module: function(Wrapper){
    return class WrapperEx extends Wrapper {

      constructor(a_initializeOptions){
        super(a_initializeOptions);
      }

      onArg(a_name, a_value, a_editor, a_isInnerCall, a_suffix){
        if (!a_isInnerCall)
          this.update();
      }

      getActionDomElement() {
        return fcf.select(this.getDomElement(), "input")[0];
      }

      onInput(a_event){
        if (this.getArg("enable"))
          this._setArg("value", this.getActionDomElement().value);
        else
          this.getActionDomElement().value = this.getArg("value");
      }
    };
  }
});
