@hashicorp/design-system-components
Version:
Helios Design System Components
29 lines (25 loc) • 2.27 kB
JavaScript
import { on } from '@ember/modifier';
import { notEq, or } from 'ember-truth-helpers';
import HdsTHelper from '../../../../helpers/hds-t.js';
import HdsTextBody from '../../text/body.js';
import HdsButton from '../../button/index.js';
import { precompileTemplate } from '@ember/template-compilation';
import { setComponentTemplate } from '@ember/component';
import templateOnly from '@ember/component/template-only';
/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: MPL-2.0
*/
const HdsFormSuperSelectAfterOptions = setComponentTemplate(precompileTemplate("{{#if @showNoSelectedMessage}}\n <HdsTextBody @tag=\"div\" @size=\"200\" class=\"hds-form-super-select__no-options-selected hds-foreground-strong\">\n {{hdsT \"hds.components.form.super-select.after-options.no-options-selected\" default=\"No options selected\"}}\n </HdsTextBody>\n{{/if}}\n<div class=\"hds-form-super-select__after-options\">\n {{#if @content}}\n <HdsTextBody @tag=\"div\" @size=\"100\" class=\"hds-foreground-strong\">\n {{@content}}\n </HdsTextBody>\n {{else}}\n {{#if (or @showAll @showSelected @clearSelected)}}\n {{#if @showOnlySelected}}\n <HdsButton @text={{hdsT \"hds.components.form.super-select.after-options.show-all\" default=\"Show all\"}} @size=\"small\" @color=\"secondary\" {{on \"click\" @showAll}} />\n {{else}}\n <HdsButton @text={{hdsT \"hds.components.form.super-select.after-options.show-selected\" default=\"Show selected\"}} @size=\"small\" @color=\"secondary\" {{on \"click\" @showSelected}} />\n {{/if}}\n {{#if (notEq @selectedCount \"0\")}}\n <HdsButton @text={{hdsT \"hds.components.form.super-select.after-options.clear-selected\" default=\"Clear selected\"}} @size=\"small\" @color=\"secondary\" {{on \"click\" @clearSelected}} />\n {{/if}}\n {{/if}}\n <HdsTextBody @tag=\"div\" @size=\"100\" class=\"hds-form-super-select__result-count hds-foreground-strong\">\n {{@resultCountMessage}}\n </HdsTextBody>\n {{/if}}\n</div>", {
strictMode: true,
scope: () => ({
HdsTextBody,
hdsT: HdsTHelper,
or,
HdsButton,
on,
notEq
})
}), templateOnly());
export { HdsFormSuperSelectAfterOptions as default };
//# sourceMappingURL=after-options.js.map