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 EuiFormLegend from './eui-form-legend.js';

const EuiFormFieldset = setComponentTemplate(precompileTemplate(`
    <fieldset ...attributes>
      {{#if (or @legend (has-block "legend"))}}
        <EuiFormLegend @compressed={{@compressed}} @display={{@display}}>
          {{#if (has-block "legend")}}
            {{yield to="legend"}}
          {{else}}
            {{@legend}}
          {{/if}}
        </EuiFormLegend>
      {{/if}}
      {{#if (has-block "fieldset")}}
        {{yield to="fieldset"}}
      {{else}}
        {{yield}}
      {{/if}}
    </fieldset>
  `, {
  strictMode: true,
  scope: () => ({
    or,
    EuiFormLegend
  })
}), templateOnly("eui-form-fieldset", "EuiFormFieldset"));

export { EuiFormFieldset as default };
//# sourceMappingURL=eui-form-fieldset.js.map
