import templateOnly from '@ember/component/template-only';
import { setComponentTemplate } from '@ember/component';
import { precompileTemplate } from '@ember/template-compilation';
import argOrDefault from '../helpers/arg-or-default.js';
import classNames from '../helpers/class-names.js';
import EuiDescriptionListDescription from './eui-description-list-description.js';
import EuiDescriptonListTitle from './eui-description-list-title.js';

const EuiDescriptionList = setComponentTemplate(precompileTemplate(`
    <dl
      class={{classNames
        (if (argOrDefault @compressed false) "euiDescriptionList--compressed")
        type=(argOrDefault @type "row")
        textStyle=(argOrDefault @textStyle "normal")
        align=(argOrDefault @align "left")
        componentName="EuiDescriptionList"
      }}
      ...attributes
    >
      {{#if @listItems}}
        {{#each @listItems as |item|}}
          <EuiDescriptionListTitle class={{@titleProps.className}}>
            {{item.title}}
          </EuiDescriptionListTitle>
          <EuiDescriptionListDescription class={{@descriptionProps.className}}>
            {{item.description}}
          </EuiDescriptionListDescription>
        {{/each}}
      {{else}}
        {{yield}}
      {{/if}}
    </dl>
  `, {
  strictMode: true,
  scope: () => ({
    classNames,
    argOrDefault,
    EuiDescriptionListTitle: EuiDescriptonListTitle,
    EuiDescriptionListDescription
  })
}), templateOnly("eui-description-list", "EuiDescriptionList"));

export { EuiDescriptionList as default };
//# sourceMappingURL=eui-description-list.js.map
