import Gtk from "gi://Gtk"; import type { GjsContext } from "../../../reconciler/gjs-renderer"; import type { HostContext } from "../../../reconciler/host-context"; import { BaseElement, type GjsElement } from "../../gjs-element"; import { ElementLifecycleController } from "../../utils/element-extenders/element-lifecycle-controller"; import type { SyntheticEvent } from "../../utils/element-extenders/event-handlers"; import { EventHandlers } from "../../utils/element-extenders/event-handlers"; import type { DiffedProps } from "../../utils/element-extenders/map-properties"; import { PropertyMapper } from "../../utils/element-extenders/map-properties"; import type { AlignmentProps } from "../../utils/property-maps-factories/create-alignment-prop-mapper"; import type { ChildPropertiesProps } from "../../utils/property-maps-factories/create-child-props-mapper"; import type { ExpandProps } from "../../utils/property-maps-factories/create-expand-prop-mapper"; import type { MarginProps } from "../../utils/property-maps-factories/create-margin-prop-mapper"; import type { SizeRequestProps } from "../../utils/property-maps-factories/create-size-request-prop-mapper"; import type { StyleProps } from "../../utils/property-maps-factories/create-style-prop-mapper"; import type { TooltipProps } from "../../utils/property-maps-factories/create-tooltip-prop-mapper"; import { OptionsList } from "./options-list"; type SelectorPropsMixin = ChildPropertiesProps & SizeRequestProps & AlignmentProps & MarginProps & ExpandProps & StyleProps & TooltipProps; export interface SelectorProps extends SelectorPropsMixin { options: Array<{ label: string; value?: V; }>; selected?: number; /** Label to use for the unselected option. */ noSelect?: string; onChange?: (event: SyntheticEvent<{ /** Value of the selected option. */ value?: V; /** Index of the selected option. is -1 if no option is selected. */ index: number; }>) => void; } export declare class SelectorElement extends BaseElement implements GjsElement<"SELECTOR", Gtk.ComboBox> { static getContext(currentContext: HostContext): HostContext; readonly kind = "SELECTOR"; protected parent: GjsElement | null; readonly lifecycle: ElementLifecycleController; protected readonly optionsList: OptionsList; protected widget: Gtk.ComboBox; protected readonly handlers: EventHandlers>; protected readonly propsMapper: PropertyMapper>; constructor(props: DiffedProps); protected getCurrentActiveOption(): { index: number; value?: any; }; updateProps(props: DiffedProps): void; appendChild(): void; insertBefore(): void; remove(parent: GjsElement): void; render(): void; notifyWillMountTo(parent: GjsElement): boolean; notifyMounted(): void; notifyChildWillUnmount(): void; show(): void; hide(): void; getWidget(): Gtk.ComboBox; getParentElement(): GjsElement | null; diffProps(oldProps: Record, newProps: Record): DiffedProps; } export {};