import { Observable } from "rxjs";
import { TccClientApplication } from "./ClientScripts/EnterpriseClasses/tcc-client-application";
import { TccClientFields } from "./ClientScripts/EnterpriseClasses/tcc-client-fields";
import { TccClientScript } from "./ClientScripts/EnterpriseClasses/tcc-client-script";
import { TccClientTable } from "./ClientScripts/EnterpriseClasses/tcc-client-table";
import { TccRemoteQueryFactory } from "./ClientScripts/EnterpriseClasses/tcc-remote-query";
import { TccField } from "./ClientScripts/Infinity/tcc-field";
import { TccClientResources } from "./ClientScripts/EnterpriseClasses/tcc-client-resources";
import { TccClientUtils } from "./ClientScripts/EnterpriseClasses/tcc-client-utils";
export declare namespace TccScripting {
    export enum FieldType {
        FT_Empty = 0,
        FT_Complex = 1,
        FT_Enum = 2,
        FT_Primitive = 3
    }
    export interface clientClassObjects extends context {
        "ccApplication": TccClientApplication;
        "ccScript": TccClientScript;
        "ccResources": TccClientResources;
        "ccFields": TccClientFields;
        "ccTable": TccClientTable;
        "ccFactory": TccRemoteQueryFactory;
        "ccRootField": TccField;
        "ccUtils": TccClientUtils;
    }
    export interface syncEventFunction {
        (): void;
    }
    export interface asyncEventFunction {
        (): Observable<boolean>;
    }
    export interface Resources {
        [propname: string]: any;
    }
    export interface context {
        [propname: string]: any;
    }
    export interface script {
        text: string;
        context: context;
    }
    export interface script2 {
        path: string;
        context: context;
    }
    type scriptResult1 = {
        [eventName in syncGlobalEventName]?: syncEventFunction;
    };
    type scriptResult15 = {
        [eventName in asyncGlobalEventName]?: asyncEventFunction;
    };
    interface scriptResult2 {
        Fields: fieldScript;
    }
    export type scriptResult = (scriptResult1 | scriptResult15) & scriptResult2;
    type fieldScript1 = {
        [eventName in syncFieldSpecificEventName]?: syncEventFunction;
    };
    type fieldScript15 = {
        [eventName in asyncFieldSpecificEventName]?: asyncEventFunction;
    };
    interface fieldScript2 {
        [fieldName: string]: fieldScript;
    }
    export type fieldScript = fieldScript1 | fieldScript15 | fieldScript2;
    type events1 = {
        [eventName in syncFieldSpecificEventName]?: {
            id: string;
            func: syncEventFunction;
        }[];
    };
    type events3 = {
        [eventName in asyncFieldSpecificEventName]?: {
            id: string;
            func: asyncEventFunction;
        }[];
    };
    type events2 = {
        [eventName in syncGlobalEventName]?: syncEventFunction;
    };
    type events4 = {
        [eventName in asyncGlobalEventName]?: asyncEventFunction;
    };
    export type events = events1 & events2 & events3 & events4;
    export enum syncFieldSpecificEventName {
        AfterUserexit = "AfterUserexit",
        OnChanged = "OnChanged",
        OnConfirm = "OnConfirm",
        OnDropDown = "OnDropDown",
        OnEnter = "OnEnter",
        OnExit = "OnExit",
        OnRepeat = "OnRepeat",
        OnSCO = "OnSCO",
        OnSelect = "OnSelect",
        OnSelectAlternative = "OnSelectAlternative"
    }
    export enum asyncFieldSpecificEventName {
        OnUserexit = "OnUserexit"
    }
    export const fieldSpecificEventName: {
        OnUserexit: asyncFieldSpecificEventName.OnUserexit;
        AfterUserexit: syncFieldSpecificEventName.AfterUserexit;
        OnChanged: syncFieldSpecificEventName.OnChanged;
        OnConfirm: syncFieldSpecificEventName.OnConfirm;
        OnDropDown: syncFieldSpecificEventName.OnDropDown;
        OnEnter: syncFieldSpecificEventName.OnEnter;
        OnExit: syncFieldSpecificEventName.OnExit;
        OnRepeat: syncFieldSpecificEventName.OnRepeat;
        OnSCO: syncFieldSpecificEventName.OnSCO;
        OnSelect: syncFieldSpecificEventName.OnSelect;
        OnSelectAlternative: syncFieldSpecificEventName.OnSelectAlternative;
    };
    export type fieldSpecificEventName = syncFieldSpecificEventName | asyncFieldSpecificEventName;
    export enum syncGlobalEventName {
        AfterExport = "AfterExport",
        AfterRecognition = "AfterRecognition",
        OnSave = "OnSave",
        AfterSave = "AfterSave",
        OnAddRow = "OnAddRow",
        OnCheck = "OnCheck",
        OnClose = "OnClose",
        OnDeleteRow = "OnDeleteRow",
        OnExport = "OnExport",
        OnInsertRow = "OnInsertRow",
        /**
         * @deprecated WILL NOT BE CALLED ANYMORE! Use OnStart instead.
         */
        OnLoad = "OnLoad",
        OnLoadDocument = "OnLoadDocument",
        OnStart = "OnStart"
    }
    export enum asyncGlobalEventName {
        OnRelease = "OnRelease"
    }
    export const globalEventName: {
        OnRelease: asyncGlobalEventName.OnRelease;
        AfterExport: syncGlobalEventName.AfterExport;
        AfterRecognition: syncGlobalEventName.AfterRecognition;
        OnSave: syncGlobalEventName.OnSave;
        AfterSave: syncGlobalEventName.AfterSave;
        OnAddRow: syncGlobalEventName.OnAddRow;
        OnCheck: syncGlobalEventName.OnCheck;
        OnClose: syncGlobalEventName.OnClose;
        OnDeleteRow: syncGlobalEventName.OnDeleteRow;
        OnExport: syncGlobalEventName.OnExport;
        OnInsertRow: syncGlobalEventName.OnInsertRow;
        OnLoad: syncGlobalEventName.OnLoad;
        OnLoadDocument: syncGlobalEventName.OnLoadDocument;
        OnStart: syncGlobalEventName.OnStart;
    };
    export type globalEventName = syncGlobalEventName | asyncGlobalEventName;
    export {};
}
