import templateOnly from '@ember/component/template-only';
import { setComponentTemplate } from '@ember/component';
import { precompileTemplate } from '@ember/template-compilation';
import { or } from 'ember-truth-helpers';
import argOrDefault from '../helpers/arg-or-default.js';
import EuiIcon from './eui-icon.js';
import EuiToolTip from './eui-tool-tip.js';

const EuiIconTip = setComponentTemplate(precompileTemplate(`
  {{#let
    (has-block "content") (has-block "title")
    as |hasContentBlock hasTitleBlock|
  }}
    <EuiToolTip
      @position={{argOrDefault @position "top"}}
      @delay={{argOrDefault @delay "regular"}}
      @hasTitle={{if (or hasTitleBlock @title) true false}}
      @anchorClassName={{@anchorClassName}}
      @onMouseOut={{@onMouseOut}}
      @display={{@display}}
      ...attributes
    >
      <:anchor>
        <EuiIcon
          tabindex="0"
          @iconClasses={{@iconProps.className}}
          @type={{argOrDefault @type "questionInCircle"}}
          @color={{@color}}
          @size={{@size}}
          aria-label={{argOrDefault @ariaLabel "Info"}}
        />
      </:anchor>
      <:title>
        {{#if hasTitleBlock}}
          {{yield to="title"}}
        {{else}}
          {{@title}}
        {{/if}}
      </:title>
      <:content>
        {{#if hasContentBlock}}
          {{yield to="content"}}
        {{else}}
          {{@content}}
        {{/if}}
      </:content>
    </EuiToolTip>
  {{/let}}
`, {
  strictMode: true,
  scope: () => ({
    EuiToolTip,
    argOrDefault,
    or,
    EuiIcon
  })
}), templateOnly("eui-icon-tip", "EuiIconTip"));

export { EuiIconTip as default };
//# sourceMappingURL=eui-icon-tip.js.map
