import * as i0 from '@angular/core';
import { TemplateRef, AfterContentInit, OnChanges, OnDestroy, AfterViewInit, EventEmitter, ElementRef, ChangeDetectorRef, DestroyRef, Renderer2, SimpleChanges } from '@angular/core';
import { ButtonType } from '@fundamental-ngx/core/button';
import { MenuItemComponent, MenuComponent } from '@fundamental-ngx/core/menu';
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
import { IconFont } from '@fundamental-ngx/core/icon';

/**
 * Directive used to identify the template which will populate the main action button.
 * Used to achieve complex buttons that require more than a string.
 *```html
 *    <fd-button-split>
 *        <ng-template fd-button-split-action-title>
 *            <p>Paragraph 1</p>
 *            <p>Paragraph 2</p>
 *        </ng-template>
 *        <fd-menu>
 *             <li fd-menu-item>
 *               <a fd-menu-interactive [routerLink]="'/'">
 *                   <span fd-menu-title>option2</span>
 *               </a>
 *            </li>
 *            <li fd-menu-item>
 *               <a fd-menu-interactive [routerLink]="'/'">
 *                   <span fd-menu-title>option2</span>
 *               </a>
 *            </li>
 *        </fd-menu>
 *    </fd-button-split>
 *</fd-button-split>
 *```
 */
declare class SplitButtonActionTitle {
    static ɵfac: i0.ɵɵFactoryDeclaration<SplitButtonActionTitle, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<SplitButtonActionTitle, "[fd-split-button-action-title]", never, {}, {}, never, never, true, never>;
}

interface MainAction {
    mainActionTitle: string | TemplateRef<any>;
    keepMainAction?: boolean;
    callback?: () => void;
}

declare const splitButtonTextClass = "fd-button-split__text";
/**
 * Split Button component, used to enhance standard HTML button and add possibility to put some dropdown with
 * additional options.
 *
 * ```html
 * <fd-split-button>
 *   <fd-menu>
 *       <li fd-menu-item>
 *           <div fd-menu-interactive>
 *               <span fd-menu-title>Option 1</span>
 *           </div>
 *       </li>
 *       <li fd-menu-item>
 *           <div fd-menu-interactive>
 *               <span fd-menu-title>Option 2</span>
 *           </div>
 *       </li>
 *    </fd-menu>
 *</fd-split-button>
 * ```
 */
declare class SplitButtonComponent implements AfterContentInit, OnChanges, OnDestroy, AfterViewInit {
    private _cdRef;
    private _destroyRef;
    private _contentDensityObserver;
    private _renderer;
    /** The icon to include in the button. See the icon page for the list of icons. */
    glyph: string;
    /** Glyph font family */
    glyphFont: IconFont;
    /** The icon to include in the button. See the icon page for the list of icons. */
    disabled: boolean;
    /** The type of the button. Types include 'standard', 'positive', 'medium', and 'negative'.
     * Leave empty for default (Action button).'*/
    fdType: ButtonType;
    /** Title attribute used to describe expand button */
    expandButtonTitle: string;
    /** Selected menu item */
    selected: MenuItemComponent;
    /** Whether or not the element should keep a fixed width. The width could change if the text changes length. */
    fixedWidth: boolean;
    /**
     * The object that contains the mainActionTitle, keepMainAction option and the callback function that should be
     * executed when the button is clicked.
     */
    mainAction: MainAction;
    /** aria-label attribute */
    arialLabel: string;
    /** Event sent when primary button is clicked */
    readonly primaryButtonClicked: EventEmitter<Event>;
    /** @hidden */
    titleTemplate: TemplateRef<any> | null;
    /** @hidden */
    menu: MenuComponent;
    /** @hidden */
    mainActionBtn: ElementRef;
    /** @hidden */
    menuActionBtn: ElementRef;
    /** The Title for main action button */
    mainActionTitle: string;
    /** @hidden */
    mainButtonWidth: string;
    /** @hidden */
    get typeClass(): string;
    /** @hidden */
    private _mainActionTitle;
    /** @hidden */
    private _menuItemSubscriptions;
    /** @hidden */
    private _menuSubscription;
    /** @hidden */
    private _contentDensitySubscription;
    /** @hidden */
    private _menuActivePathSubscription;
    /** @hidden */
    private readonly _injector;
    /** @hidden */
    constructor(_cdRef: ChangeDetectorRef, _destroyRef: DestroyRef, _contentDensityObserver: ContentDensityObserver, _renderer: Renderer2);
    /** @hidden Emits event when main button is clicked */
    onMainButtonClick(event: MouseEvent): void;
    /** @hidden */
    ngAfterContentInit(): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** Function called to select a menu item for the split button. */
    selectMenuItem(menuItem: MenuItemComponent): void;
    /**
     * Wrapper gets focused programmatically by menu
     * when the "escape" button is pressed.
     * In this case we need to transit focus to the "more actions" button
     */
    _onGroupFocused(): void;
    /** @hidden */
    private _getMainButtonWidth;
    /** @hidden */
    private _setupMenuItemSubscriptions;
    /** @hidden */
    private _handleMenuItemSelection;
    /** @hidden */
    private _setupMenuSubscription;
    /** @hidden */
    private _handleMainActionObject;
    /** @hidden */
    private _addButtonTextClass;
    /** @hidden */
    private _focusTriggerElement;
    static ɵfac: i0.ɵɵFactoryDeclaration<SplitButtonComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SplitButtonComponent, "fd-split-button", never, { "glyph": { "alias": "glyph"; "required": false; }; "glyphFont": { "alias": "glyphFont"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "fdType": { "alias": "fdType"; "required": false; }; "expandButtonTitle": { "alias": "expandButtonTitle"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "fixedWidth": { "alias": "fixedWidth"; "required": false; }; "mainAction": { "alias": "mainAction"; "required": false; }; "arialLabel": { "alias": "arialLabel"; "required": false; }; }, { "primaryButtonClicked": "primaryButtonClicked"; }, ["titleTemplate", "menu"], ["fd-menu"], true, never>;
}

/**
 * @deprecated
 * Use individual component imports.
 */
declare class SplitButtonModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<SplitButtonModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<SplitButtonModule, never, [typeof SplitButtonComponent, typeof SplitButtonActionTitle], [typeof SplitButtonComponent, typeof SplitButtonActionTitle]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<SplitButtonModule>;
}

export { SplitButtonActionTitle, SplitButtonComponent, SplitButtonModule, splitButtonTextClass };
