import { Injector } from '@angular/core';
import { NavGroup } from '../../../controls/navigation/nav-group';
import { NavItem } from '../../../controls/navigation/nav-item';
import { TelemetryService } from '../../../core/telemetry.service';
import { Help } from '../../../display/help/help-types';
import { PageBaseComponent, PageInitResult } from '../../page/page-base/page-base.component';
import * as i0 from "@angular/core";
export interface WizardTab extends NavItem {
    /**
     * Path to a form group/array/control contained in the form's main form group.
     * Used to map a tab to it's form model for form validation in WizardBaseComponent.
     * See https://angular.io/api/forms/AbstractControl#get-usage-notes for details on paths.
     */
    formModelPath?: string | (string | number)[];
    help?: Help;
    title?: string;
    completed?: boolean;
}
export declare abstract class WizardBaseComponent extends PageBaseComponent {
    isWizardMode: boolean;
    showWizardSaveSuccess: boolean;
    /** True when there are no custom fields or when in wizard mode on the custom fields tab */
    showSave: boolean;
    /** True when in wizard mode you do not want to show the next or save button*/
    hideNextSaveButton: boolean;
    /** True when in wizard mode and on the custom fields tab */
    showBack: boolean;
    /** Labels for the cancel, next and back buttons */
    nextLabel?: string;
    backLabel?: string;
    cancelLabel: string;
    dialogId: string;
    /**
     * Contains the available wizard tabs. Passed to TabsComponent.
     * @memberof WizardBaseComponent
     */
    private _tabGroup;
    get tabGroup(): NavGroup;
    set tabGroup(value: NavGroup);
    /**
     * Contains the tab that is currently selected.
     * @memberof WizardBaseComponent
     */
    private _currentTab?;
    get currentTab(): WizardTab | undefined;
    protected initPromise: Promise<WizardBaseComponent>;
    protected telemetryService: TelemetryService;
    constructor(injector: Injector);
    protected onFirstInit(): void;
    protected abstract onInit(): Promise<PageInitResult>;
    protected onWizardSaveSuccess(): void;
    protected onAfterViewInit(): Promise<void>;
    protected applyModelUpdates(): Promise<void>;
    protected saveToApi(): Promise<number | void>;
    protected onSaveComplete(entityId: number): void;
    onSave(event: Event): Promise<void>;
    /**
     * Navigates to the next tab in the tab group. Calls canGoToNextTab() to determine if navigating to the next tab
     * is allowed or not. If tab validation succeeds, enables the next tab (if it is disabled) and selects it.
     * @memberof WizardBaseComponent
     */
    nextTab(): void;
    /**
     * Navigates to the previous tab in the tab group. Calls canGoToPreviousTab() to determine if navigating to the previous tab
     * is allowed or not. Navigates to the tab if validation succeeds
     * @memberof WizardBaseComponent
     */
    previousTab(): void;
    protected updateButtons(): void;
    /**
     * Required to configure the tabs and default tab for the wizard. Runs in onFirstInit, before onInit.
     * @memberof WizardBaseComponent
     */
    protected abstract configureTabs(): NavGroup;
    /**
     * Used to determine whether navigation to the next tab is prevented or not. Fired in nextTab(), but not when a tab is
     * clicked or selected programmatically. By default, this checks the validity of the current tab's form model and
     * prevents navigation if it is invalid. Can be overridden if different logic is needed.
     * @param nextTab - The tab being navigated to
     * @memberof WizardBaseComponent
     */
    protected canGoToNextTab(nextTab: WizardTab): boolean;
    /**
     * Used to determine whether navigation to the previous tab is prevented or not. Fired in previousTab(), but not when a tab is
     * clicked or selected programmatically. By default, this checks the validity of the current tab's form model and
     * prevents navigation if it is invalid. Can be overridden if different logic is needed.
     * @param prevTab - The tab being navigated to
     * @memberof WizardBaseComponent
     */
    protected canGoToPreviousTab(prevTab: WizardTab): boolean;
    /**
     * Used to determine whether navigating away from the current tab is prevented or not. Fired any time the selected tab
     * changes in the tabGroup. By default, this checks the validity of the current tab's form model and prevents navigation
     * if it is invalid. Can be overridden if different logic is needed.
     * @memberof WizardBaseComponent
     */
    protected canLeaveCurrentTab(): boolean;
    /**
     * Triggers validation on the current wizard tab's form control. Returns true if the form control is valid, false if not.
     * Returns true if the formModelPath for the tab is not defined or no form control is found. Can be overridden if different
     * logic is needed to validate the form control for the current tab.
     * @memberof WizardBaseComponent
     */
    protected isCurrentTabValid(): boolean;
    /**
     * Fired if navigation to a tab succeeds. Hides the error banner by default, but can be overridden if logic is needed.
     * @memberof WizardBaseComponent
     */
    protected onTabChangeSuccess(): void;
    /**
     * Fired if navigation to a tab fails. By default, shows the error banner with the default invalid form message, but
     * can be overridden if different logic is needed.
     * @memberof WizardBaseComponent
     */
    protected onTabChangeFailed(): void;
    /**
     * Listen for when the tabGroup's selected item is changed (I.E. when a tab is clicked or selected programmatically)
     * and navigate to that tab.
     */
    private subscribeToTabChanges;
    /**
     * Triggered when the tabGroup's selected item changes. If the current tab passes validation, updates
     * the current tab to the selected tab.
     * @param tab - the tab that was selected
     */
    private goToTab;
    /**
     * Updates the current tab, title, and help.
     * @param tab Tab to set
     */
    private setCurrentTab;
    static ɵfac: i0.ɵɵFactoryDeclaration<WizardBaseComponent, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<WizardBaseComponent, never, never, {}, {}, never, never, false, never>;
}
