<template>
  <fieldset class="type field has-children c${columns} columns" if.bind="display">
    <legend if.bind="!collapsed">
      <select value.two-way="selectedType">
        <option repeat.for="type of possibleTypes">${type}</option>
      </select>
      <input type="text" if.bind="keyKey" value.bind="key" placeholder.bind="keyPlaceholder">
    </legend>
    <h3 class="title">
      ${label}
      <tooltip if.bind="helpText" text.bind="helpText">
        <img src="res/info.svg" alt="Info"/>
      </tooltip>
    </h3>
    <compose if.bind="!collapsed" containerless view-model.bind="child"></compose>
  </fieldset>
</template>

<template>
  <fieldset class="type field has-children c${columns} columns" if.bind="display">
    <legend if.bind="!collapsed">
      <select value.two-way="selectedType">
        <option repeat.for="type of possibleTypes">${type}</option>
      </select>
      <input type="text" if.bind="keyKey" value.bind="key" placeholder.bind="keyPlaceholder">
    </legend>
    <h3 click.delegate="toggleCollapse()" class="title">
      ${label}
      <tooltip if.bind="helpText" text.bind="helpText">
        <img src="res/info.svg" alt="Info"/>
      </tooltip>
    </h3>
    <compose if.bind="!collapsed" containerless view-model.bind="child"></compose>
  </fieldset>
</template>

Allow toggling Typefield collapse like other fields
Allow toggling Typefield collapse like other fields
