import Button from "@ui5/webcomponents/dist/Button.js";
import Icon from "@ui5/webcomponents/dist/Icon.js";
import Option from "@ui5/webcomponents/dist/Option.js";
import Select from "@ui5/webcomponents/dist/Select.js";
import type SearchField from "./SearchField.js";
import decline from "@ui5/webcomponents-icons/dist/decline.js";
import search from "@ui5/webcomponents-icons/dist/search.js";
import slimArrowDown from "@ui5/webcomponents-icons/dist/slim-arrow-down.js";
import ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js";
import BusyIndicator from "@ui5/webcomponents/dist/BusyIndicator.js";
import SearchFieldScopePopoverTemplate from "./SearchFieldScopePopoverTemplate.js";
export type SearchFieldTemplateOptions = {
/**
* If set to true, the search field will be expanded.
*/
forceExpanded?: boolean;
};
export default function SearchFieldTemplate(this: SearchField, options?: SearchFieldTemplateOptions) {
return (
!options?.forceExpanded && this.collapsed ? (
) : (
{this.scopes?.length ? (
<>
{!this._isMobileView ? (
// Desktop/Tablet: Show full Select component
<>
>
) : (
// Mobile/Phone: Show icon button only
<>
>
)}
>
) : this.filterButton?.length ? (
<>