import * as i0 from '@angular/core';
import { EventEmitter, TemplateRef, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, Renderer2, OnChanges, AfterContentInit, QueryList, SimpleChanges } from '@angular/core';
import { Nullable, TabbableElementService } from '@fundamental-ngx/cdk/utils';
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
import { Observable } from 'rxjs';
import * as i1 from '@fundamental-ngx/core/toolbar';
import { ToolbarSpacerDirective } from '@fundamental-ngx/core/toolbar';
import { HeadingLevel } from '@fundamental-ngx/core/shared';
import * as i2 from '@fundamental-ngx/core/button';
import * as i3 from '@fundamental-ngx/core/avatar';

declare class GridListFilterBarComponent {
    /** Event is thrown, when the control button is clicked */
    readonly close: EventEmitter<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListFilterBarComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListFilterBarComponent, "fd-grid-list-filter-bar", never, {}, { "close": "close"; }, never, ["*"], true, never>;
}

declare class GridListFooterComponent {
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListFooterComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListFooterComponent, "fd-grid-list-footer", never, {}, {}, never, ["*"], true, never>;
}

declare class GridListGroupHeaderComponent {
    /** Sets the `aria-label` attribute to the element. */
    ariaLabel: Nullable<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListGroupHeaderComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListGroupHeaderComponent, "fd-grid-list-group-header", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, never, ["*"], true, never>;
}

declare class GridListItemFooterBarComponent {
    /** @hidden */
    contentTemplateRef: TemplateRef<any>;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListItemFooterBarComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListItemFooterBarComponent, "fd-grid-list-item-footer-bar", never, {}, {}, never, ["*"], true, never>;
}

declare class GridListItemToolbarComponent {
    /** @hidden */
    contentTemplateRef: TemplateRef<any>;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListItemToolbarComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListItemToolbarComponent, "fd-grid-list-item-toolbar", never, {}, {}, never, ["*"], true, never>;
}

declare class GridListItemBodyDirective {
    readonly templateRef: TemplateRef<any>;
    /** @hidden */
    constructor(templateRef: TemplateRef<any>);
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListItemBodyDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<GridListItemBodyDirective, "[fd-grid-list-item-body]", never, {}, {}, never, never, true, never>;
}

type GridListSelectionMode = 'none' | 'delete' | 'singleSelect' | 'singleSelectLeft' | 'singleSelectRight' | 'multiSelect';
declare enum GridListSelectionActions {
    ADD = "add",
    REMOVE = "remove"
}
declare enum GridListSelectionModeEnum {
    NONE = "none",
    DELETE = "delete",
    SINGLE_SELECT = "singleSelect",
    SINGLE_SELECT_LEFT = "singleSelectLeft",
    SINGLE_SELECT_RIGHT = "singleSelectRight",
    MULTI_SELECT = "multiSelect"
}
interface GridListSelectionEvent<T> {
    /** currently selected items */
    selection: T[];
    /** items added */
    added: T[];
    /** items removed */
    removed: T[];
    /** indexes location of additions or removals */
    index: number[];
}

declare abstract class GridList<T> {
    /** an observable of selection state event */
    abstract _selectedItems$: Observable<GridListSelectionEvent<T>>;
    /** method to be used by list items to register the selection */
    abstract setSelectedItem(item: T, componentIndex: number, action?: GridListSelectionActions | null, event?: MouseEvent): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridList<any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<GridList<any>, never, never, {}, {}, never, never, true, never>;
}

interface GridListItemOutputEvent<T> {
    index?: number;
    value?: T;
}
type GridListItemType = 'inactive' | 'active' | 'detail' | 'detailsAndActive' | 'navigation';
type GridListItemState = 'unread' | 'locked' | 'error' | 'draft';
type GridListItemStatus = 'success' | 'warning' | 'error' | 'neutral';
declare class GridListItemComponent<T> implements AfterViewInit, OnDestroy {
    private readonly _cd;
    private readonly _elementRef;
    private readonly _render;
    private readonly _gridList;
    readonly _contentDensityObserver: ContentDensityObserver;
    private readonly _tabbableElementService;
    /** id for the Element */
    id: string;
    /** width of the element */
    width: string;
    /**
     * specify the cell layout in the format `XLn-Ln-Mn-Sn` where n is
     * the number of occupied columns and n can be different for each size.
     */
    set layoutItemPattern(value: Nullable<string>);
    /**
     * Defines the status of Grid List Item
     * (Statuses: success | warning | error | neutral)
     */
    status?: GridListItemStatus;
    /** Sets number of sub items */
    counter: Nullable<number>;
    /**
     * Value field stores information for radio button value, checkbox button and for GridListSelectionEvent
     * The field is mandatory for modes like singleSelect, singleSelectLeft, singleSelectRight or multiSelect
     */
    value?: T;
    /** Whether click on the custom toolbar is disabled */
    disableToolbarClick: boolean;
    /** Allows an item to be selected programmatically */
    selected: boolean;
    /** Remove the padding from the Item body */
    noPadding: boolean;
    /** Sets the `aria-label` attribute to the element. */
    ariaLabel: Nullable<string>;
    /** Sets the `aria-label` attribute to the element. */
    ariaLabelledBy: Nullable<string>;
    /**
     * Defines the type of Grid List Item
     * Types:
     * - active: indicates that the item is clickable via active feedback when item is pressed
     * - detail: enables detail button of the list item that fires event.
     * - detailsAndActive: enables "detail" and "active" enumerations together
     * - inactive: indicates the list item does not have any active feedback when item is pressed
     * - navigation: indicates the list item is navigable to show extra information about the item
     * Default: inactive
     */
    set type(value: Nullable<GridListItemType>);
    get type(): GridListItemType;
    /**
     * Sets the state of Grid List Item
     * (States: unread | error | locked | draft)
     */
    state?: GridListItemState;
    /**
     * The navigated state of the list item.
     * If set to true, a navigation indicator is displayed at the end of the list item.
     */
    isNavigated: boolean;
    /** Title of the item */
    title: string;
    /**
     * Aria-level of the title
     * Available options: 1, 2, 3, 4, 5, 6
     * Default: 4
     */
    titleLevel: 1 | 2 | 3 | 4 | 5 | 6;
    /** Description of the item */
    description: string;
    /** When set to true the grid list item's height will be set to auto */
    autoHeight: boolean;
    /**
     * Event is thrown, when type is active
     * and item is pressed
     */
    press: EventEmitter<GridListItemOutputEvent<T>>;
    /**
     * Event is thrown, when type is detail or detailsAndActive
     * and Detail button was pressed
     */
    detail: EventEmitter<GridListItemOutputEvent<T>>;
    /**
     * Event is thrown, when mode delete
     * and Delete button was pressed
     */
    delete: EventEmitter<GridListItemOutputEvent<T>>;
    /**
     * Event is thrown, when type is navigation
     * and Navigate button was pressed
     */
    navigate: EventEmitter<GridListItemOutputEvent<T>>;
    /**
     * Event is thrown on grid list item click.
     */
    cardClick: EventEmitter<GridListItemOutputEvent<T>>;
    /**
     * Event is thrown, when state is error, not used GridListItemFooterBarComponent
     * and Draft button was pressed
     */
    draft: EventEmitter<GridListItemOutputEvent<T>>;
    /**
     * Event is thrown, when state is locked, not used GridListItemFooterBarComponent
     * and Locked button was pressed
     */
    locked: EventEmitter<GridListItemOutputEvent<T>>;
    /** @hidden */
    _gridListItem: ElementRef<HTMLDivElement>;
    /** @hidden */
    footerBarComponent: Nullable<GridListItemFooterBarComponent>;
    /** @hidden */
    itemToolbarComponent: Nullable<GridListItemToolbarComponent>;
    /** @hidden */
    body: Nullable<GridListItemBodyDirective>;
    /** @hidden
     * The active state of the list item.
     * If set to true, the whole card has active state. Becomes false only when the Edit button is clicked.
     */
    _isActive: boolean;
    /** @hidden */
    set gridLayoutClasses(value: string[]);
    get gridLayoutClasses(): string[];
    /** @hidden */
    _selectedItem?: T;
    /** @hidden */
    set selectionMode(mode: GridListSelectionMode | undefined);
    get selectionMode(): GridListSelectionMode | undefined;
    /** @hidden */
    _index?: number;
    /** tabIndex of the element */
    tabIndex: i0.WritableSignal<number>;
    /** @hidden */
    private _type;
    /** @hidden */
    private _selectionMode?;
    /** @hidden */
    private _gridLayoutClasses;
    /** @hidden */
    private readonly subscription;
    /** @hidden */
    private _innerElementFocused;
    /** @hidden */
    constructor(_cd: ChangeDetectorRef, _elementRef: ElementRef, _render: Renderer2, _gridList: GridList<T>, _contentDensityObserver: ContentDensityObserver, _tabbableElementService: TabbableElementService);
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** Focus grid list item programmatically */
    focus(options?: FocusOptions): void;
    /** @hidden */
    _setActive(event: MouseEvent, isActive: boolean): void;
    /** @hidden */
    _singleSelect(event: Event): void;
    /** @hidden */
    _checkboxClick(event: MouseEvent): void;
    /** @hidden */
    _checkboxEscape(): void;
    /** @hidden */
    _selectionItem(value: boolean | number | T, event?: MouseEvent): void;
    /** @hidden */
    _onDetail(event: MouseEvent): void;
    /** @hidden */
    _onNavigate(event: MouseEvent): void;
    /** @hidden */
    _onDelete(event: MouseEvent): void;
    /** @hidden */
    _clickOnDraft(event: MouseEvent): void;
    /** @hidden */
    _clickOnLocked(event: MouseEvent): void;
    /** @hidden */
    _onClick(event: MouseEvent): void;
    /** @hidden */
    _onKeyDown(event: KeyboardEvent): void;
    /** @hidden */
    private _isElementCanBeClicked;
    /** @hidden */
    private _isToolbarElement;
    /** @hidden */
    private _preventDefault;
    /** @hidden */
    private get _outputEventValue();
    /** @hidden */
    private _addClassesNames;
    /** @hidden */
    private _removeClassesNames;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListItemComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListItemComponent<any>, "fd-grid-list-item", never, { "id": { "alias": "id"; "required": false; }; "width": { "alias": "width"; "required": false; }; "layoutItemPattern": { "alias": "layoutItemPattern"; "required": false; }; "status": { "alias": "status"; "required": false; }; "counter": { "alias": "counter"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disableToolbarClick": { "alias": "disableToolbarClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "noPadding": { "alias": "noPadding"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "type": { "alias": "type"; "required": false; }; "state": { "alias": "state"; "required": false; }; "isNavigated": { "alias": "isNavigated"; "required": false; }; "title": { "alias": "title"; "required": false; }; "titleLevel": { "alias": "titleLevel"; "required": false; }; "description": { "alias": "description"; "required": false; }; "autoHeight": { "alias": "autoHeight"; "required": false; }; }, { "press": "press"; "detail": "detail"; "delete": "delete"; "navigate": "navigate"; "cardClick": "cardClick"; "draft": "draft"; "locked": "locked"; }, ["footerBarComponent", "itemToolbarComponent", "body"], ["[fd-grid-list-item-image]"], true, never>;
    static ngAcceptInputType_selected: unknown;
}

declare class GridListMoreBtnComponent {
    /** Sets title of the button */
    title: string;
    /** Sets the number of total items. */
    totalCount: number;
    /** Sets the number of display items. */
    displayCount: number;
    /** Event is thrown, when the control button is clicked */
    showMore: EventEmitter<void>;
    /** @hidden */
    _onKeyDown(event: KeyboardEvent): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListMoreBtnComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListMoreBtnComponent, "fd-grid-list-more-btn", never, { "title": { "alias": "title"; "required": false; }; "totalCount": { "alias": "totalCount"; "required": false; }; "displayCount": { "alias": "displayCount"; "required": false; }; }, { "showMore": "showMore"; }, never, never, true, never>;
}

declare class GridListTitleBarSpacerComponent extends ToolbarSpacerDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListTitleBarSpacerComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListTitleBarSpacerComponent, "fd-grid-list-title-bar-spacer", never, {}, {}, never, never, true, never>;
}

declare class GridListTitleBarComponent {
    /** Sets title of the Grid List */
    title: string;
    /**
     * Sets the semantic heading level for the title bar.
     * Renders `role="heading"` with the corresponding `aria-level` attribute.
     * Accepts values 1–6 (as numbers or strings).
     * @default 2
     */
    readonly headingLevel: i0.InputSignal<HeadingLevel>;
    protected readonly normalizedLevel: i0.Signal<number>;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListTitleBarComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListTitleBarComponent, "fd-grid-list-title-bar", never, { "title": { "alias": "title"; "required": false; }; "headingLevel": { "alias": "headingLevel"; "required": false; "isSignal": true; }; }, {}, never, ["[fd-grid-list-title-bar-additional-title-item]", "*"], true, never>;
}

declare class GridListTitleBarAdditionalTitleItemDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListTitleBarAdditionalTitleItemDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<GridListTitleBarAdditionalTitleItemDirective, "[fd-grid-list-title-bar-additional-title-item]", never, {}, {}, never, never, true, never>;
}

declare class GridListComponent<T> extends GridList<T> implements OnChanges, AfterContentInit, OnDestroy {
    /** id for the Element */
    id: string;
    /** width of the element */
    width: string;
    /** Sets the `aria-label` attribute to the element. */
    ariaLabel: Nullable<string>;
    /**
     * Defines the mode of Grid List
     * Modes:
     * - none: Default mode (no selection)
     * - delete: Delete mode (only one list item can be deleted via provided delete button)
     * - singleSelect: Selected item is highlighted but no selection control is visible (only one list item can be selected)
     * - singleSelectLeft: Left-positioned single selection mode (only one list item can be selected)
     * - singleSelectRight: Right-positioned single selection mode (only one list item can be selected)
     * - multiSelect: Multi-selection mode (more than one list item can be selected)
     *  */
    selectionMode: GridListSelectionMode;
    /**
     * specify the column layout in the format `XLn-Ln-Mn-Sn` where n is the number of columns and can be different for each size.
     * eg: XL2-L2-M2-S1 would create 2-column layouts for XL, L, and M sizes and single-column layout for S size.
     */
    layoutPattern: string;
    /** Event is thrown, when mode is singleSelect, singleSelectLeft, singleSelectRight or multiSelect and item was selected */
    selectionChange: EventEmitter<GridListSelectionEvent<T>>;
    /** @hidden */
    set gridListItems(components: QueryList<GridListItemComponent<T>>);
    get gridListItems(): QueryList<GridListItemComponent<T>>;
    /** @hidden */
    readonly _selectedItems$: Observable<GridListSelectionEvent<T>>;
    /** @hidden */
    private _gridListItems;
    /** @hidden */
    private readonly _rangeSelector;
    /** @hidden */
    private readonly _selectedItems;
    /** @hidden */
    private readonly _selectedItemsSubject$;
    /** @hidden */
    private readonly subscription;
    /** An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing)  */
    private readonly _destroyRef;
    /** @hidden */
    private readonly _cd;
    /** @hidden */
    private readonly _elRef;
    /** @hidden */
    private readonly _rtlService;
    /** @hidden */
    private readonly _isRtl;
    /** @hidden */
    constructor();
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    ngAfterContentInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /**
     * Clears previous selection of the items.
     */
    clearSelection(): void;
    /** @hidden */
    setSelectedItem(item: T, componentIndex: number, action?: GridListSelectionActions | null, event?: PointerEvent): void;
    /** @hidden */
    handleKeydown(event: KeyboardEvent): void;
    /** @hidden */
    private _handleHomeEndKeydown;
    /** @hidden */
    private _handleTabKeydown;
    /** @hidden */
    private _handleShiftArrowKeydown;
    /** @hidden */
    private _handleArrowKeydown;
    /** hidden */
    private _calculateIndexToFocus;
    /** hidden */
    private _persistSelectionState;
    /** hidden */
    private _getCurrentItemIndex;
    /** hidden */
    private _focusItemAtIndex;
    /** hidden */
    private _toggleSelection;
    /** @hidden */
    private _listenOnQueryChange;
    /** @hidden */
    private _setFirstFocusableItem;
    /** @hidden */
    private _getItemsPerRow;
    /** @hidden */
    private _updateGridListItemsProperties;
    /** @hidden */
    private _updateGridListItemsProperty;
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<GridListComponent<any>, "fd-grid-list", never, { "id": { "alias": "id"; "required": false; }; "width": { "alias": "width"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "layoutPattern": { "alias": "layoutPattern"; "required": false; }; }, { "selectionChange": "selectionChange"; }, ["gridListItems"], ["*"], true, never>;
}

declare class GridListItemImageDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListItemImageDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<GridListItemImageDirective, "[fd-grid-list-item-image]", never, {}, {}, never, never, true, never>;
}

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
declare class GridListModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<GridListModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<GridListModule, never, [typeof i1.ToolbarModule, typeof i2.ButtonModule, typeof i3.AvatarModule, typeof GridListComponent, typeof GridListItemComponent, typeof GridListTitleBarComponent, typeof GridListFilterBarComponent, typeof GridListMoreBtnComponent, typeof GridListFooterComponent, typeof GridListItemFooterBarComponent, typeof GridListItemToolbarComponent, typeof GridListGroupHeaderComponent, typeof GridListTitleBarSpacerComponent, typeof GridListTitleBarAdditionalTitleItemDirective, typeof GridListItemImageDirective, typeof GridListItemBodyDirective], [typeof GridListComponent, typeof GridListItemComponent, typeof GridListTitleBarComponent, typeof GridListFilterBarComponent, typeof GridListMoreBtnComponent, typeof GridListFooterComponent, typeof GridListItemFooterBarComponent, typeof GridListItemToolbarComponent, typeof GridListGroupHeaderComponent, typeof GridListTitleBarSpacerComponent, typeof GridListTitleBarAdditionalTitleItemDirective, typeof GridListItemImageDirective, typeof GridListItemBodyDirective]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<GridListModule>;
}

export { GridListComponent, GridListFilterBarComponent, GridListFooterComponent, GridListGroupHeaderComponent, GridListItemBodyDirective, GridListItemComponent, GridListItemFooterBarComponent, GridListItemImageDirective, GridListItemToolbarComponent, GridListModule, GridListMoreBtnComponent, GridListSelectionActions, GridListSelectionModeEnum, GridListTitleBarAdditionalTitleItemDirective, GridListTitleBarComponent, GridListTitleBarSpacerComponent };
export type { GridListItemOutputEvent, GridListItemState, GridListItemStatus, GridListItemType, GridListSelectionEvent, GridListSelectionMode };
