import * as i0 from "@angular/core";
import { AfterViewInit, ComponentRef, EventEmitter, InjectionToken, OnChanges, OnInit, SimpleChanges, TemplateRef, Type } from "@angular/core";
import { Direction } from "@angular/cdk/bidi";
import { NgStyleInterface, NzSafeAny } from "ng-zorro-antd/core/types";
import { Observable, Subject } from "rxjs";
import { FocusTrap } from "@angular/cdk/a11y";
import { OverlayRef } from "@angular/cdk/overlay";
import { CdkPortalOutlet, TemplatePortal } from "@angular/cdk/portal";
import { NzConfigKey } from "ng-zorro-antd/core/config";
import { isTemplateRef } from "ng-zorro-antd/core/util";
declare namespace drawer_content_directive_d_exports {
  export { NzDrawerContentDirective };
}
export declare class NzDrawerContentDirective {
  templateRef: TemplateRef<any>;
  static ɵfac: i0.ɵɵFactoryDeclaration<NzDrawerContentDirective, never>;
  static ɵdir: i0.ɵɵDirectiveDeclaration<NzDrawerContentDirective, "[nzDrawerContent]", ["nzDrawerContent"], {}, {}, never, never, true, never>;
}
declare namespace drawer_footer_directive_d_exports {
  export { NzDrawerFooterDirective };
}
export declare class NzDrawerFooterDirective implements OnInit {
  readonly templateRef: TemplateRef<{}>;
  private readonly drawerRef;
  constructor();
  ngOnInit(): void;
  static ɵfac: i0.ɵɵFactoryDeclaration<NzDrawerFooterDirective, never>;
  static ɵdir: i0.ɵɵDirectiveDeclaration<NzDrawerFooterDirective, "[nzDrawerFooter]", ["nzDrawerFooter"], {}, {}, never, never, true, never>;
}
export declare abstract class NzDrawerRef<T = NzSafeAny, R = NzSafeAny> {
  abstract afterClose: Observable<R | undefined>;
  abstract afterOpen: Observable<void>;
  abstract close(result?: R): void;
  abstract open(): void;
  abstract getContentComponent(): T | null;
  abstract getContentComponentRef(): Readonly<ComponentRef<T>> | null;
  abstract updateConfig(options: NzDrawerUpdateOptions<T>): void;
  abstract nzClosable?: boolean;
  abstract nzNoAnimation?: boolean;
  abstract nzMaskClosable?: boolean;
  abstract nzKeyboard?: boolean;
  abstract nzMask?: boolean;
  abstract nzTitle?: string | TemplateRef<{}>;
  abstract nzExtra?: string | TemplateRef<{}>;
  abstract nzFooter?: string | TemplateRef<{}>;
  abstract nzOnCancel?: () => Promise<NzSafeAny>;
  abstract nzPlacement?: NzDrawerPlacement;
  abstract nzMaskStyle?: object;
  abstract nzBodyStyle?: object;
  abstract nzWrapClassName?: string;
  abstract nzWidth?: number | string;
  abstract nzHeight?: number | string;
  abstract nzZIndex?: number | string;
  abstract nzOffsetX?: number | string;
  abstract nzOffsetY?: number | string;
}
export declare const DRAWER_DEFAULT_SIZE = 378;
export declare const DRAWER_LARGE_SIZE = 736;
export type NzDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
export type NzDrawerSize = 'default' | 'large';
/**
 * @deprecated Use `NzDrawerOptions` instead.
 */
export type NzDrawerOptionsOfComponent<T = NzSafeAny, D = NzSafeAny> = NzDrawerOptions<T, D>;
export interface NzDrawerOptions<T = NzSafeAny, D = NzSafeAny> {
  nzClosable?: boolean;
  nzMaskClosable?: boolean;
  nzCloseOnNavigation?: boolean;
  nzDirection?: Direction;
  nzMask?: boolean;
  nzKeyboard?: boolean;
  nzNoAnimation?: boolean;
  nzTitle?: string | TemplateRef<{}>;
  nzExtra?: string | TemplateRef<{}>;
  nzFooter?: string | TemplateRef<{}>;
  nzContent?: TemplateRef<{
    $implicit: D;
    drawerRef: NzDrawerRef;
  }> | Type<T>;
  /**
   * @deprecated will be removed in v23, please use `nzData` instead
   */
  nzContentParams?: Partial<T & D>;
  nzData?: D;
  nzMaskStyle?: object;
  nzBodyStyle?: object;
  nzWrapClassName?: string;
  nzSize?: NzDrawerSize;
  nzWidth?: number | string;
  nzHeight?: number | string;
  nzPlacement?: NzDrawerPlacement;
  nzZIndex?: number;
  nzOffsetX?: number;
  nzOffsetY?: number;
  nzOnCancel?(): Promise<NzSafeAny>;
}
export type NzDrawerUpdateOptions<T = NzSafeAny> = Omit<NzDrawerOptions<T>, 'nzContent' | 'nzContentParams' | 'nzData'>;
export declare const NZ_DRAWER_DATA: InjectionToken<any>;
declare namespace drawer_component_d_exports {
  export { DRAWER_ANIMATE_DURATION, NzDrawerComponent };
}
export declare const DRAWER_ANIMATE_DURATION = 300;
export declare class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extends Partial<T> = NzSafeAny> extends NzDrawerRef<T, R> implements OnInit, AfterViewInit, OnChanges, NzDrawerOptions {
  private readonly renderer;
  private readonly injector;
  private readonly cdr;
  private readonly focusTrapFactory;
  private readonly viewContainerRef;
  private readonly overlayKeyboardDispatcher;
  private readonly directionality;
  private readonly destroyRef;
  private readonly document;
  private readonly location;
  readonly _nzModuleName: NzConfigKey;
  nzContent: TemplateRef<{
    $implicit: D;
    drawerRef: NzDrawerRef<R>;
  }> | Type<T>;
  nzCloseIcon: string | TemplateRef<void>;
  nzClosable: boolean;
  nzMaskClosable: boolean;
  nzMask: boolean;
  nzCloseOnNavigation: boolean;
  nzNoAnimation: boolean;
  nzKeyboard: boolean;
  nzTitle?: string | TemplateRef<{}>;
  nzExtra?: string | TemplateRef<{}>;
  private readonly footer;
  get nzFooter(): string | TemplateRef<{}> | undefined;
  set nzFooter(value: string | TemplateRef<{}> | undefined);
  nzOnCancel?: () => Promise<NzSafeAny>;
  nzPlacement: NzDrawerPlacement;
  nzSize: NzDrawerSize;
  nzMaskStyle: NgStyleInterface;
  nzBodyStyle: NgStyleInterface;
  nzWrapClassName?: string;
  nzWidth?: number | string;
  nzHeight?: number | string;
  nzZIndex: number;
  nzOffsetX: number;
  nzOffsetY: number;
  private componentInstance;
  private componentRef;
  set nzVisible(value: boolean);
  get nzVisible(): boolean;
  readonly nzOnViewInit: EventEmitter<void>;
  readonly nzOnClose: EventEmitter<MouseEvent>;
  readonly nzVisibleChange: EventEmitter<boolean>;
  drawerTemplate: TemplateRef<void>;
  bodyPortalOutlet?: CdkPortalOutlet;
  contentFromContentChild?: TemplateRef<NzSafeAny>;
  previouslyFocusedElement?: HTMLElement;
  placementChanging: boolean;
  placementChangeTimeoutId?: ReturnType<typeof setTimeout>;
  nzContentParams?: NzSafeAny;
  nzData?: D;
  overlayRef?: OverlayRef | null;
  portal?: TemplatePortal;
  focusTrap?: FocusTrap;
  isOpen: boolean;
  inAnimation: boolean;
  templateContext: {
    $implicit: D | undefined;
    drawerRef: NzDrawerRef<R>;
  };
  protected isTemplateRef: typeof isTemplateRef;
  protected readonly maskAnimationEnter: import("@angular/core").Signal<string>;
  protected readonly maskAnimationLeave: import("@angular/core").Signal<string>;
  get offsetTransform(): string | null;
  get transform(): string | null;
  get width(): string | null;
  get height(): string | null;
  get isLeftOrRight(): boolean;
  nzAfterOpen: Subject<void>;
  nzAfterClose: Subject<R | undefined>;
  get afterOpen(): Observable<void>;
  get afterClose(): Observable<R | undefined>;
  get isNzContentTemplateRef(): boolean;
  nzDirection?: Direction;
  protected readonly dir: () => Direction;
  constructor();
  ngOnInit(): void;
  ngAfterViewInit(): void;
  ngOnChanges(changes: SimpleChanges): void;
  private getAnimationDuration;
  private triggerPlacementChangeCycleOnce;
  close(result?: R): void;
  open(): void;
  getContentComponent(): T | null;
  getContentComponentRef(): ComponentRef<T> | null;
  updateConfig(options: NzDrawerUpdateOptions<T>): void;
  closeClick(): void;
  maskClick(): void;
  private attachBodyContent;
  private attachOverlay;
  private subscribeToNavigation;
  private disposeOverlay;
  private updateOverlayStyle;
  private updateBodyOverflow;
  savePreviouslyFocusedElement(): void;
  private trapFocus;
  private restoreFocus;
  static ɵfac: i0.ɵɵFactoryDeclaration<NzDrawerComponent<any, any, any>, never>;
  static ɵcmp: i0.ɵɵComponentDeclaration<NzDrawerComponent<any, any, any>, "nz-drawer", ["nzDrawer"], {
    "nzContent": {
      "alias": "nzContent";
      "required": false;
    };
    "nzCloseIcon": {
      "alias": "nzCloseIcon";
      "required": false;
    };
    "nzClosable": {
      "alias": "nzClosable";
      "required": false;
    };
    "nzMaskClosable": {
      "alias": "nzMaskClosable";
      "required": false;
    };
    "nzMask": {
      "alias": "nzMask";
      "required": false;
    };
    "nzCloseOnNavigation": {
      "alias": "nzCloseOnNavigation";
      "required": false;
    };
    "nzNoAnimation": {
      "alias": "nzNoAnimation";
      "required": false;
    };
    "nzKeyboard": {
      "alias": "nzKeyboard";
      "required": false;
    };
    "nzTitle": {
      "alias": "nzTitle";
      "required": false;
    };
    "nzExtra": {
      "alias": "nzExtra";
      "required": false;
    };
    "nzFooter": {
      "alias": "nzFooter";
      "required": false;
    };
    "nzPlacement": {
      "alias": "nzPlacement";
      "required": false;
    };
    "nzSize": {
      "alias": "nzSize";
      "required": false;
    };
    "nzMaskStyle": {
      "alias": "nzMaskStyle";
      "required": false;
    };
    "nzBodyStyle": {
      "alias": "nzBodyStyle";
      "required": false;
    };
    "nzWrapClassName": {
      "alias": "nzWrapClassName";
      "required": false;
    };
    "nzWidth": {
      "alias": "nzWidth";
      "required": false;
    };
    "nzHeight": {
      "alias": "nzHeight";
      "required": false;
    };
    "nzZIndex": {
      "alias": "nzZIndex";
      "required": false;
    };
    "nzOffsetX": {
      "alias": "nzOffsetX";
      "required": false;
    };
    "nzOffsetY": {
      "alias": "nzOffsetY";
      "required": false;
    };
    "nzVisible": {
      "alias": "nzVisible";
      "required": false;
    };
  }, {
    "nzOnViewInit": "nzOnViewInit";
    "nzOnClose": "nzOnClose";
    "nzVisibleChange": "nzVisibleChange";
  }, ["contentFromContentChild"], never, true, never>;
  static ngAcceptInputType_nzClosable: unknown;
  static ngAcceptInputType_nzMaskClosable: unknown;
  static ngAcceptInputType_nzMask: unknown;
  static ngAcceptInputType_nzCloseOnNavigation: unknown;
  static ngAcceptInputType_nzNoAnimation: unknown;
  static ngAcceptInputType_nzKeyboard: unknown;
  static ngAcceptInputType_nzVisible: unknown;
}
export declare class NzDrawerModule {
  static ɵfac: i0.ɵɵFactoryDeclaration<NzDrawerModule, never>;
  static ɵmod: i0.ɵɵNgModuleDeclaration<NzDrawerModule, never, [typeof NzDrawerComponent, typeof NzDrawerContentDirective, typeof NzDrawerFooterDirective], [typeof NzDrawerComponent, typeof NzDrawerContentDirective, typeof NzDrawerFooterDirective]>;
  static ɵinj: i0.ɵɵInjectorDeclaration<NzDrawerModule>;
}
export declare class DrawerBuilderForService<T extends {}, R> {
  private overlayRef;
  private options;
  private drawerRef;
  private unsubscribe$;
  constructor(overlayRef: OverlayRef, options: NzDrawerOptions);
  getInstance(): NzDrawerRef<T, R>;
  updateOptions(options: NzDrawerOptions): void;
}
export declare class NzDrawerService {
  private injector;
  create<T extends {} = NzSafeAny, D = undefined, R = NzSafeAny>(options: NzDrawerOptions<T, D extends undefined ? {} : D>): NzDrawerRef<T, R>;
  static ɵfac: i0.ɵɵFactoryDeclaration<NzDrawerService, never>;
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}