import { ViewportRuler } from '@angular/cdk/scrolling';
import * as _angular_core from '@angular/core';
import { OnInit, OnDestroy, EventEmitter, ChangeDetectorRef, TemplateRef, InjectionToken } from '@angular/core';
import { ColorAccent, FdDropEvent } from '@fundamental-ngx/cdk/utils';
import { IndicationColor } from '@fundamental-ngx/core/avatar';
import { IconFont } from '@fundamental-ngx/core/icon';
import { PopoverConfig, TriggerConfig } from '@fundamental-ngx/core/popover';
import { Placement } from '@fundamental-ngx/core/shared';

interface ProductSwitchItem {
    /** Title of product */
    title: string;
    /** Subtitle of product */
    subtitle?: string;
    /** Callback function that will be called on selecting this product from dropdown */
    callback?: (event: MouseEvent) => void;
    /** Icon of product item */
    icon?: string;
    /** Avatar representing the product item */
    avatar?: {
        glyph?: string;
        label?: string;
        circle?: boolean;
        image?: string;
        contain?: boolean;
        transparent?: boolean;
        placeholder?: boolean;
        tile?: boolean;
        colorAccent?: ColorAccent | null;
        colorIndication?: IndicationColor | null;
        border?: boolean;
        alterIcon?: string;
        backupImage?: string;
        ariaLabel?: string;
    };
    /** Font of product item */
    font?: IconFont;
    /** Whether user wants to mark this element ass selected */
    selected?: boolean;
    /** Whether user wants to disable drag and drop functionality from single element */
    disabledDragAndDrop?: boolean;
    /** Whether this element should stick in one place, without changing position */
    stickToPosition?: boolean;
}

declare class ProductSwitchBodyComponent implements OnInit, OnDestroy {
    private _viewportRuler;
    private readonly _cdr;
    /** Defines if drag and drop functionality should be included in product switch*/
    dragAndDropEnabled: boolean;
    /** The product switch's product items. */
    products: ProductSwitchItem[];
    /** Defines if the product switcher should be displayed in list mode, no matter what is the size of window */
    forceListMode: boolean;
    /** Event thrown on products array change */
    readonly productsChange: EventEmitter<any[]>;
    /** Event emitted on product click */
    readonly itemClicked: EventEmitter<void>;
    /** @hidden */
    protected readonly FD_DEFAULT_ICON_FONT_FAMILY = "SAP-icons";
    /** @hidden */
    private _listMode;
    /** @hidden */
    private _subscriptions;
    /** @hidden */
    private _rtlService;
    /** @hidden */
    constructor(_viewportRuler: ViewportRuler, _cdr: ChangeDetectorRef);
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden */
    _itemClick(item: ProductSwitchItem, event: MouseEvent): void;
    /** Method called on products change */
    _productSwitchItemsChangeHandle(dropEvent: FdDropEvent<ProductSwitchItem>): void;
    /** @hidden */
    _keyDownHandle(event: KeyboardEvent): void;
    /** @hidden */
    _isSmallMode(): boolean;
    /** @hidden */
    _isListMode(): boolean;
    /** @hidden */
    private _checkSize;
    /** @hidden */
    private _handleNoListKeydown;
    /** @hidden */
    private _handleNoListMoreThanSeven;
    /** @hidden */
    private _handleNoListLessThanSeven;
    /** @hidden */
    private _handleListArrowUpDown;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProductSwitchBodyComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProductSwitchBodyComponent, "fd-product-switch-body", never, { "dragAndDropEnabled": { "alias": "dragAndDropEnabled"; "required": false; }; "products": { "alias": "products"; "required": false; }; "forceListMode": { "alias": "forceListMode"; "required": false; }; }, { "productsChange": "productsChange"; "itemClicked": "itemClicked"; }, never, never, true, never>;
}

declare class ProductSwitchButtonDirective {
    readonly templateRef: TemplateRef<any>;
    /** @hidden */
    constructor(templateRef: TemplateRef<any>);
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProductSwitchButtonDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ProductSwitchButtonDirective, "[fdProductSwitchButton]", never, {}, {}, never, never, true, never>;
}

declare class ProductSwitchComponent {
    /**
     * Configuration object for popover settings.
     * When provided, these settings will be merged with individual input properties.
     * Individual inputs take precedence over config object values.
     */
    readonly config: _angular_core.InputSignal<PopoverConfig>;
    /** Placement of a popover. */
    readonly placement: _angular_core.InputSignal<Placement>;
    /** Whether the product switch is disabled. */
    readonly disabled: _angular_core.InputSignal<boolean>;
    /** Whether the popover should close when the escape key is pressed. */
    readonly closeOnEscapeKey: _angular_core.InputSignal<boolean>;
    /** Whether the popover should close when a click is made outside its boundaries. */
    readonly closeOnOutsideClick: _angular_core.InputSignal<boolean>;
    /** Whether the popover should have an arrow. */
    readonly noArrow: _angular_core.InputSignal<boolean>;
    /** Whether to wrap content with fd-scrollbar directive. */
    readonly disableScrollbar: _angular_core.InputSignal<boolean>;
    /** The trigger events that will open/close the popover. */
    readonly triggers: _angular_core.InputSignal<(string | TriggerConfig)[]>;
    /** Whether the popover should be focusTrapped. */
    readonly focusTrapped: _angular_core.InputSignal<boolean>;
    /** Whether the popover should automatically move focus into the trapped region. */
    readonly focusAutoCapture: _angular_core.InputSignal<boolean>;
    /** Two-way binding for open state. */
    readonly isOpen: _angular_core.ModelSignal<boolean>;
    /** Event emitted right before the popover is being opened. */
    readonly beforeOpen: _angular_core.OutputEmitterRef<void>;
    /** @hidden */
    protected readonly customProductSwitchButton: _angular_core.Signal<ProductSwitchButtonDirective | undefined>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProductSwitchComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProductSwitchComponent, "fd-product-switch", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closeOnEscapeKey": { "alias": "closeOnEscapeKey"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "noArrow": { "alias": "noArrow"; "required": false; "isSignal": true; }; "disableScrollbar": { "alias": "disableScrollbar"; "required": false; "isSignal": true; }; "triggers": { "alias": "triggers"; "required": false; "isSignal": true; }; "focusTrapped": { "alias": "focusTrapped"; "required": false; "isSignal": true; }; "focusAutoCapture": { "alias": "focusAutoCapture"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "beforeOpen": "beforeOpen"; }, ["customProductSwitchButton"], ["*"], true, never>;
}

/**
 * @deprecated
 * Use direct imports of `ProductSwitchComponent`, `ProductSwitchBodyComponent`
 */
declare class ProductSwitchModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProductSwitchModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ProductSwitchModule, never, [typeof ProductSwitchComponent, typeof ProductSwitchBodyComponent], [typeof ProductSwitchComponent, typeof ProductSwitchBodyComponent]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<ProductSwitchModule>;
}

declare const FD_PRODUCT_SWITCH_COMPONENT: InjectionToken<unknown>;

export { FD_PRODUCT_SWITCH_COMPONENT, ProductSwitchBodyComponent, ProductSwitchButtonDirective, ProductSwitchComponent, ProductSwitchModule };
export type { ProductSwitchItem };
