{% set allowOverrides = allowOverrides ?? false %}

{% embed '_includes/forms/componentSelect.twig' with {
  options: options ?? craft.app.entries.getAllEntryTypes(),
  showHandles: true,
  showIndicators: showIndicators ?? allowOverrides,
  inputValueFn: et => allowOverrides ? et.toArray(['id', 'name', 'handle']) : null,
  createAction: (create ?? false) ? 'entry-types/edit' : null,
  jsClass: 'Craft.EntryTypeSelectInput',
  jsSettings: {
    allowOverrides,
  }|merge(jsSettings ?? {}),
} %}
  {% block chips %}
    {% for entryType in values %}
      <li>
        {% set chip = chip(entryType, {
          inputName: inputName ?? name ?? null,
          inputValue: allowOverrides ? entryType.toArray(['id', 'name', 'handle'])|json_encode : null,
          checkbox: selectable ?? false,
          showActionMenu: showActionMenus,
          showHandle: showHandles,
          showIndicators: showIndicators,
          hyperlink: hyperlinks,
        }) %}
        {% if disabled %}
          {% set chip = chip|removeClass('removable') %}
        {% endif %}
        {{ chip|raw }}
      </li>
    {% endfor %}
  {% endblock %}
{% endembed %}
