export function processTemplateFormHidden(item, parentTemplates, dataVariable = "data") {
  let formHiddenOptions = Object.assign({ itemValue: "", hook: "" }, item.inputOptions);
  if (formHiddenOptions.hook.trim()) {
    formHiddenOptions.hook = formHiddenOptions.hook.replace(/\n/g, ";").trim();
    if (!/^return\s/.test(formHiddenOptions.hook)) {
      formHiddenOptions.hook = `return ${formHiddenOptions.hook}`;
    }
    formHiddenOptions.hook = ` :hook="(data,modelValue) => {${formHiddenOptions.hook}}"`;
  } else {
    formHiddenOptions.hook = "";
  }
  return `<form-hidden v-model="${dataVariable}.${item.variableName || ""}" :item-value="${formHiddenOptions.itemValue || "data"}"${formHiddenOptions.hook}></form-hidden>`;
}
