@if (displayMode === 'chips') {
@for (option of options; track option.index) {
{{ option.name }}
@if (option.subChoiceSelection && isSelected(option.index)) {
: {{ option.subChoiceSelection }}
} @if (option.value?.type === 'subchoice' && isSelected(option.index) &&
!option.subChoiceSelection) {
(select option)
}
}
}
@if (displayMode === 'checkboxes') {
@for (option of options; track option.index) {
{{ option.name }}
}
}
@if (displayMode === 'equipment') {
@for (option of options; track option.index) {
@if (option.type === 'counted_reference') {
{{ option.count || 1 }} × {{ option.name }}
} @else {
{{ option.name }}
}
}
}
@if (selection.length > 0) {
Selected: {{ selection.length }}/{{ chooseCount }}
@for (value of selection; track value) {
@if (getSelectedOptionType(value) === 'counted_reference') {
{{ getSelectedOptionCount(value) || 1 }} x
{{ getOptionName(value) }}
} @else {
{{ getOptionName(value) }}
@if (getSubchoiceSelection(value)) {
: {{ getSubchoiceSelection(value) }}
} @if (needsSubchoiceSelection(value)) {
(select option)
} }
}
}
@if (!canSelectMore() && selection.length > 0) {
Maximum selections reached ({{ chooseCount }})
} @else if (required && selection.length < chooseCount) {
Please select {{ chooseCount - selection.length }} more option{{
chooseCount - selection.length > 1 ? "s" : ""
}}
} @if (showingDisabledMessage) {
}