<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">

  <t t-name="web.DropdownItem">
    <t
      t-tag="props.href ? 'a' : 'span'"
      t-att-href="props.href"
      class="dropdown-item"
      t-att-class="props.class"
      role="menuitem"
      t-on-click.stop="onClick"
      t-att-title="props.title"
      t-att-data-hotkey="props.hotkey"
      t-att="dataAttributes"
      tabindex="0"
    >
      <t t-slot="default" />
    </t>
  </t>

  <!-- In this file instead of in its own file as expected, because it must
  be defined after the template it inherits from -->
  <t t-name="web.CheckboxItem" t-inherit="web.DropdownItem" t-inherit-mode="primary">
    <xpath expr="//t[@role='menuitem']" position="attributes">
      <attribute name="role">menuitemcheckbox</attribute>
      <attribute name="t-att-aria-checked">props.checked ? 'true' : 'false'</attribute>
    </xpath>
  </t>

</templates>
