import{validation}from"../../Validation.js";import{getFormForElement}from"./FormElementMap.js";class SetFormElementItemProperty{execute(e,t){var{propertyName:r,propertyValue:o,itemKey:m}=e;let{elementName:i,form:n}=e;"object"==typeof i&&(n=getFormForElement(i)),validation.exists("form",n),validation.exists("itemKey",m);let a=validation.string("itemKey",m,"");""===a&&(a=validation.number("itemKey",m,validation.never));m=a.toString(),e=validation.boolean("markdown",e.markdown,!0);return i=n.actor.getElementName(i,n.event),n.actor.assignElementItemProperty(i,m,r,o,e),{}}}SetFormElementItemProperty.action="gcx:wf:forms::SetFormElementItemProperty",SetFormElementItemProperty.suite="gcx:wf:builtin";export{SetFormElementItemProperty};