define(["require","exports","../../Validation","./FormElementMap"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=(n.prototype.execute=function(e,t){var a=e.matchType,n=e.value,i=e.elementName,e=e.form;switch("object"==typeof i&&(e=o.getFormForElement(i)),r.validation.exists("form",e),r.validation.string("matchType",a,r.validation.never),r.validation.exists("value",n),a){case"index":case"item":case"key":case"label":case"value":break;default:r.validation.fail("matchOn",'The `matchOn` input must be "index", "item", "key", "label" or "value".')}i=e.actor.getElementName(i,e.event);return{result:e.actor.setCurrentItem(i,n,a)}},n.action="gcx:wf:forms::SetCurrentFormElementItem",n.suite="gcx:wf:builtin",n);function n(){}t.SetCurrentFormElementItem=a});