import { EventEmitter, Injector, OnInit } from '@angular/core';
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
import { IdOrInstanceOrToken } from '@rxap/definition';
import { ToggleSubject } from '@rxap/rxjs';
import * as i0 from "@angular/core";
export declare class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnInit {
    protected readonly remoteMethodLoader: RemoteMethodLoader;
    private readonly injector;
    private readonly remoteMethodToken?;
    parameters?: Parameters;
    metadata?: Metadata;
    executed$: EventEmitter<any>;
    failure$: EventEmitter<Error>;
    successful$: EventEmitter<ReturnType>;
    immediately: boolean;
    /**
     * true - a remote method call is in progress
     */
    executing$: ToggleSubject;
    constructor(remoteMethodLoader: RemoteMethodLoader, injector?: Injector, remoteMethodToken?: any | undefined);
    protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;
    set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
    private _hasConfirmDirective;
    set hasConfirmDirective(value: any);
    ngOnInit(): void;
    onConfirmed(): void;
    onClick(): void;
    execute(): Promise<void>;
    setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void;
    updateParameters(parameters: Partial<Parameters>): void;
    protected executed(result: any): void;
    protected failure(error: Error): void;
    protected successful(result: ReturnType): void;
    /**
     * @deprecated removed
     * @protected
     */
    protected call(): Promise<any>;
    static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodDirective<any, any, any>, [null, null, { optional: true; self: true; }]>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "parameters": { "alias": "parameters"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "immediately": { "alias": "immediately"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethod"; "required": false; }; "hasConfirmDirective": { "alias": "rxapConfirm"; "required": false; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; }, never, never, true, never>;
}
