{{#unless (or (eq attr.type "boolean") (contains attr.options.editType (array "boolean" "searchSelect" "mountAccessor" "kv" "file" "ttl" "stringArray" "json" ) ) ) }} {{/unless}} {{#if attr.options.possibleValues}}
{{else if (and (eq attr.type "string") (eq attr.options.editType "boolean"))}}
{{else if (eq attr.options.editType "searchSelect")}}
{{else if (eq attr.options.editType "mountAccessor")}} {{mount-accessor-select name=attr.name label=labelString warning=attr.options.warning helpText=attr.options.helpText value=(get model valuePath) onChange=(action "setAndBroadcast" valuePath) }} {{else if (eq attr.options.editType "kv")}} {{kv-object-editor value=(get model valuePath) onChange=(action "setAndBroadcast" valuePath) label=labelString warning=attr.options.warning helpText=attr.options.helpText }} {{else if (eq attr.options.editType "file")}} {{text-file index="" file=file onChange=(action "setFile") warning=attr.options.warning label=labelString }} {{else if (eq attr.options.editType "ttl")}} {{ttl-picker data-test-input=attr.name initialValue=(or (get model valuePath) attr.options.defaultValue) labelText=labelString warning=attr.options.warning setDefaultValue=(or attr.options.setDefault false) onChange=(action (action "setAndBroadcast" valuePath)) }} {{else if (eq attr.options.editType "stringArray")}} {{string-list data-test-input=attr.name label=labelString warning=attr.options.warning helpText=attr.options.helpText inputValue=(get model valuePath) onChange=(action (action "setAndBroadcast" valuePath)) }} {{else if (eq attr.options.sensitive true)}} {{else if (or (eq attr.type "number") (eq attr.type "string"))}}
{{#if (eq attr.options.editType "textarea")}} {{else if (eq attr.options.editType "json")}} {{json-editor value=(if (get model valuePath) (stringify (jsonify (get model valuePath))) ) valueUpdated=(action "codemirrorUpdated" attr.name "string") }} {{else}} {{#if attr.options.validationAttr}} {{#if (and (get model valuePath) (not (get model attr.options.validationAttr)) ) }} {{/if}} {{/if}} {{/if}}
{{else if (eq attr.type "boolean")}}
{{else if (eq attr.type "object")}} {{json-editor value=(if (get model valuePath) (stringify (get model valuePath)) emptyData) valueUpdated=(action "codemirrorUpdated" attr.name false) }} {{/if}}