/*! * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import { ExtendedHTMLElement } from '../../helper/dom'; export interface BaseDropdownProps { description?: string; descriptionLink?: { id: string; text: string; destination: string; onClick?: () => void; }; items: T[]; onChange?: (selectedItems: T[]) => void; tabId?: string; messageId?: string; classNames?: string[]; } export declare abstract class BaseDropdown { render: ExtendedHTMLElement; protected readonly props: BaseDropdownProps; protected readonly tabId: string; protected readonly messageId: string; protected dropdownContent: ExtendedHTMLElement | null; protected dropdownPortal: ExtendedHTMLElement | null; protected readonly uid: string; protected isOpen: boolean; protected selectedItems: T[]; protected dropdownIcon: ExtendedHTMLElement; protected readonly sheetOpenListenerId: string | null; protected abstract createItemElement(item: T): ExtendedHTMLElement; protected abstract handleItemSelection(item: T): void; protected abstract getItemSelectionState(item: T): boolean; protected abstract getDisplayLabel(): string; protected getCSSVariableValue(variableName: string, fallback: number): number; constructor(props: BaseDropdownProps); protected getInitialSelection(): T[]; protected readonly updateUI: () => void; protected abstract getItemId(item: T): string; protected readonly onLinkClick: (buttonId: string) => void; protected readonly toggleDropdown: (e: Event) => void; protected readonly openDropdown: () => void; protected readonly isElementVisible: (element: Element) => boolean; protected readonly updateDropdownPosition: () => void; protected readonly closeDropdown: () => void; protected readonly handleClickOutside: (e: MouseEvent) => void; readonly getSelectedItems: () => T[]; readonly setSelectedItems: (itemIds: string[]) => void; protected readonly dispatchChangeEvent: () => void; readonly destroy: () => void; }