import { OnInit, OnDestroy, ViewContainerRef } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { HookResult, Transition, TransitionService } from '@uirouter/core';
import { Observable, BehaviorSubject } from 'rxjs';
import { DbxActionContextStoreSourceInstance } from '@dereekb/dbx-core';
import { Maybe } from '@dereekb/util';
import * as i0 from "@angular/core";
/**
 * How to handle transitions.
 *
 * Values:
 * - none: Nothing occurs.
 * - dialog: Always show a dialog and act based on the result.
 * - auto: Try to auto-trigger if in a triggerable state. If it is modified but in a non-triggerable state, show a dialog. Should be used in conjuction with the auto-saver.
 */
export type DbxActionTransitionSafetyType = 'none' | 'dialog' | 'auto';
/**
 * Context used for preventing a transition from occuring if the action is not complete or is in a modified state.
 *
 * This can be configured to auto-trigger and wait, or show a dialog and wait for the user's feedback before doing anything.
 *
 * NOTE: This dialog only works for uirouter.
 */
export declare class DbxActionTransitionSafetyDirective<T, O> implements OnInit, OnDestroy {
    protected readonly _safetyType: BehaviorSubject<Maybe<DbxActionTransitionSafetyType>>;
    readonly dbxActionTransitionSafety: import("@angular/core").InputSignal<DbxActionTransitionSafetyType | undefined>;
    protected readonly transitionService: TransitionService;
    protected readonly viewContainerRef: ViewContainerRef;
    protected readonly dialog: MatDialog;
    readonly source: DbxActionContextStoreSourceInstance<T, O>;
    readonly safetyType$: Observable<"dialog" | "auto" | "none">;
    protected readonly _dbxActionTransitionSafetyUpdateEffect: import("@angular/core").EffectRef;
    private _currentDialogRef?;
    private stopWatchingTransition?;
    private checkIsDestroyed;
    ngOnInit(): void;
    ngOnDestroy(): void;
    protected _handleOnBeforeTransition(transition: Transition): HookResult;
    protected _handleIsModifiedState(transition: Transition, safetyType: DbxActionTransitionSafetyType): Observable<HookResult>;
    private _autoTrigger;
    private _showDialog;
    private _closeDialog;
    static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionTransitionSafetyDirective<any, any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionTransitionSafetyDirective<any, any>, "[dbxActionTransitionSafety]", never, { "dbxActionTransitionSafety": { "alias": "dbxActionTransitionSafety"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
