<templates>
  <t t-name="o-spreadsheet-PivotDeferUpdate">
    <Section
      class="'align-items-center border-top d-flex flex-row justify-content-between py-1 pivot-defer-update'">
      <Checkbox
        label="this.deferUpdatesLabel"
        title="this.deferUpdatesTooltip"
        value="this.props.deferUpdate"
        onChange="(value) => this.props.toggleDeferUpdate(value)"
      />
      <div t-if="this.props.isDirty" class="d-flex align-items-center">
        <i
          class="o-button-icon pe-0 oi"
          data-icon="undo"
          title="Discard all changes"
          t-on-click="() => this.props.discard()"
        />
        <span
          class="o-button-link sp_apply_update small ps-2"
          title="Apply all changes"
          t-on-click="() => this.props.apply()">
          Update
        </span>
      </div>
    </Section>
  </t>
</templates>
