import templateOnly from '@ember/component/template-only';
import { setComponentTemplate } from '@ember/component';
import { precompileTemplate } from '@ember/template-compilation';
import { fn } from '@ember/helper';
import { on } from '@ember/modifier';
import { eq } from 'ember-truth-helpers';
import EuiButton from '../../eui-button.js';
import EuiI18nComponent from '../../eui-i18n.js';
import EuiTextComponent from '../../eui-text.js';

const EuiSuperDatePickerDatePopoverNowTab = setComponentTemplate(precompileTemplate(`
    <EuiText
      class="euiDatePopoverContent__padded--large"
      @size="s"
      @color="subdued"
    >
      <p>
        <EuiI18n
          @token="euiDatePopoverContent.nowTabContent"
          @default="Setting the time to now means that on every refresh this time will be set to the time of the refresh."
          as |Token|
        >
          <Token as |value|>
            {{value}}
          </Token>
        </EuiI18n>
      </p>
      <EuiButton
        @fullWidth={{true}}
        @size="s"
        @fill={{true}}
        {{on "click" (fn @onChange "now")}}
      >
        {{#if (eq @position "start")}}
          <EuiI18n
            @token="euiDatePopoverContent.nowTabButtonStart"
            @default="Set start date and time to now"
            as |Token|
          >
            <Token as |value|>
              {{value}}
            </Token>
          </EuiI18n>
        {{else}}
          <EuiI18n
            @token="euiDatePopoverContent.nowTabButtonEnd"
            @default="Set end date and time to now"
            as |Token|
          >
            <Token as |value|>
              {{value}}
            </Token>
          </EuiI18n>
        {{/if}}
      </EuiButton>
    </EuiText>
  `, {
  strictMode: true,
  scope: () => ({
    EuiText: EuiTextComponent,
    EuiI18n: EuiI18nComponent,
    EuiButton,
    on,
    fn,
    eq
  })
}), templateOnly("now-tab", "EuiSuperDatePickerDatePopoverNowTab"));

export { EuiSuperDatePickerDatePopoverNowTab as default };
//# sourceMappingURL=now-tab.js.map
