import { ViewportRuler } from '@angular/cdk/scrolling';
import * as i0 from '@angular/core';
import { OnInit, OnDestroy, EventEmitter, ChangeDetectorRef, TemplateRef, InjectionToken } from '@angular/core';
import { ColorAccent, RtlService, FdDropEvent } from '@fundamental-ngx/cdk/utils';
import { IndicationColor } from '@fundamental-ngx/core/avatar';
import { IconFont } from '@fundamental-ngx/core/icon';
import { BasePopoverClass } 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 _rtlService;
    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 */
    constructor(_viewportRuler: ViewportRuler, _rtlService: RtlService, _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: i0.ɵɵFactoryDeclaration<ProductSwitchBodyComponent, [null, { optional: true; }, null]>;
    static ɵcmp: i0.ɵɵ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: i0.ɵɵFactoryDeclaration<ProductSwitchButtonDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<ProductSwitchButtonDirective, "[fdProductSwitchButton]", never, {}, {}, never, never, true, never>;
}

declare class ProductSwitchComponent extends BasePopoverClass {
    /** Placement of a popover. */
    placement: Placement;
    /** Whether the product switch is disabled. */
    disabled: boolean;
    /** @hidden */
    customProductSwitchButton: ProductSwitchButtonDirective;
    static ɵfac: i0.ɵɵFactoryDeclaration<ProductSwitchComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ProductSwitchComponent, "fd-product-switch", never, { "placement": { "alias": "placement"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["customProductSwitchButton"], ["*"], true, never>;
}

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

declare const FD_PRODUCT_SWITCH_COMPONENT: InjectionToken<unknown>;

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