import templateOnly from '@ember/component/template-only';
import { setComponentTemplate } from '@ember/component';
import { precompileTemplate } from '@ember/template-compilation';
import { or, eq } from 'ember-truth-helpers';
import argOrDefault from '../helpers/arg-or-default.js';
import classNames from '../helpers/class-names.js';
import EuiIcon from './eui-icon.js';
import EuiTextComponent from './eui-text.js';
import TextBlock from './text-block.js';

const EuiCallOut = setComponentTemplate(precompileTemplate(`
  <div
    class={{classNames
      componentName="EuiCallOut"
      size=(argOrDefault @size "m")
      color=(argOrDefault @color "primary")
    }}
    ...attributes
  >
    {{#if (or @title (has-block "title"))}}
      <div class="euiCallOutHeader">
        {{#if @iconType}}
          <EuiIcon
            @iconClasses="euiCallOutHeader__icon"
            @type={{@iconType}}
            @size="m"
            aria-hidden="true"
            @color="inherit"
          />
        {{/if}}
        {{#if @heading}}
          <TextBlock @tagName={{@heading}} class="euiCallOutHeader__title">
            {{#if (has-block "title")}}
              {{yield to="title"}}
            {{else}}
              {{@title}}
            {{/if}}
          </TextBlock>
        {{else}}
          <span class="euiCallOutHeader__title">
            {{#if (has-block "title")}}
              {{yield to="title"}}
            {{else}}
              {{@title}}
            {{/if}}
          </span>
        {{/if}}
      </div>
    {{/if}}
    {{#if (has-block "body")}}
      <EuiText @size={{if (eq @size "s") "xs" "s"}}>
        {{yield to="body"}}
      </EuiText>
    {{/if}}
  </div>
`, {
  strictMode: true,
  scope: () => ({
    classNames,
    argOrDefault,
    or,
    EuiIcon,
    TextBlock,
    EuiText: EuiTextComponent,
    eq
  })
}), templateOnly("eui-call-out", "EuiCallOut"));

export { EuiCallOut as default };
//# sourceMappingURL=eui-call-out.js.map
