import Icon from "./Icon.js"; import Button from "./Button.js"; import List from "./List.js"; import Input from "./Input.js"; import Title from "./Title.js"; import PopoverHorizontalAlign from "./types/PopoverHorizontalAlign.js"; import Popover from "./Popover.js"; import ResponsivePopover from "./ResponsivePopover.js"; import BusyIndicator from "./BusyIndicator.js"; import SuggestionItem from "./SuggestionItem.js"; import generateHighlightedMarkupFirstMatch from "@ui5/webcomponents-base/dist/util/generateHighlightedMarkupFirstMatch.js"; import type ComboBox from "./ComboBox.js"; export default function ComboBoxPopoverTemplate(this: ComboBox) { return ( <> {this.loading && } {!this.loading && this._isPhone && <>
{this._headerTitleText}
{ this._filteredItems.flatMap(item => { if (item.isGroupItem && item.items) { // For group items, return all nested items return item.items .filter(nestedItem => !!nestedItem) .map(nestedItem => ); } // For regular items return ; })}
{this.hasValueStateText &&
{ this.open && valueStateMessage.call(this) }
} } {!this._isPhone && this.hasValueStateText &&
{ this.open && valueStateMessage.call(this) }
} {!this.loading && !!this._filteredItems.length && { this._filteredItems.map(item => )} } {this._isPhone && }
{this.shouldOpenValueStateMessagePopover &&
{ valueStateMessage.call(this) }
} ); } function valueStateMessage(this: ComboBox) { return ( <> { this.shouldDisplayDefaultValueStateMessage ? this.valueStateDefaultText : } ); }