import { ChangeDetectorRef, Injector, OnChanges, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
import { Constructor, ControlOption, ControlOptions } from '@rxap/utilities';
import { NgControl } from '@angular/forms';
import { FormDefinition } from '@rxap/forms';
import { BaseRemoteMethod, RemoteMethodLoader } from '@rxap/remote-method';
import { IdOrInstanceOrToken } from '@rxap/definition';
import { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';
import * as i0 from "@angular/core";
export interface OptionsFromRemoteMethodTemplateContext {
    $implicit: ControlOption;
}
export declare const REMOTE_METHOD_NAME = "options";
export declare const RXAP_USE_REMOTE_METHOD = "rxap/form-system/remote-method/use";
export declare function UseRemoteMethod(remoteMethod: Constructor<BaseRemoteMethod>, name: string): (target: any, propertyKey: string) => void;
export declare function UseOptionsRemoteMethod(dataSource: Constructor<BaseRemoteMethod<ControlOptions>>): (target: any, propertyKey: string) => void;
export declare class ExtractRemoteMethodsMixin {
    protected extractRemoteMethods(formDefinition: FormDefinition, controlId: string): Map<string, Constructor<IdOrInstanceOrToken<BaseRemoteMethod>>>;
}
export interface OptionsFromRemoteMethodDirective<Value, Parameters> extends OnInit, ExtractFormDefinitionMixin, ExtractRemoteMethodsMixin {
}
export declare class OptionsFromRemoteMethodDirective<Value, Parameters> implements OnChanges {
    private readonly ngControl;
    private readonly template;
    private readonly remoteMethodLoader;
    private readonly viewContainerRef;
    private readonly injector;
    private readonly cdr;
    parameters?: Parameters;
    resetOnChange?: Value;
    withoutParameters: boolean;
    private remoteMethodToken;
    constructor(ngControl: NgControl, template: TemplateRef<OptionsFromRemoteMethodTemplateContext>, remoteMethodLoader: RemoteMethodLoader, viewContainerRef: ViewContainerRef, injector: Injector, cdr: ChangeDetectorRef);
    ngOnChanges(changes: SimpleChanges): void;
    private extractRemoteMethodToken;
    private renderTemplate;
    static ɵfac: i0.ɵɵFactoryDeclaration<OptionsFromRemoteMethodDirective<any, any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<OptionsFromRemoteMethodDirective<any, any>, "[rxapOptionsFromRemoteMethod]", never, { "parameters": { "alias": "rxapOptionsFromRemoteMethodParameters"; "required": false; }; "resetOnChange": { "alias": "rxapOptionsFromRemoteMethodResetOnChange"; "required": false; }; "withoutParameters": { "alias": "rxapOptionsFromRemoteMethodWithoutParameters"; "required": false; }; }, {}, never, never, true, never>;
}
