import { EventEmitter } from '@angular/core';
import { RuleModel, RuleService, ConditionGroupModel, ConditionModel, ActionModel, RuleEngineState } from './services/Rule';
import { CwChangeEvent } from './services/util/CwEvent';
import { ServerSideFieldModel } from './services/ServerSideFieldModel';
import { ConditionService } from './services/Condition';
import { ActionService } from './services/Action';
import { ConditionGroupService } from './services/ConditionGroup';
import { I18nService } from './services/system/locale/I18n';
import { BundleService, IPublishEnvironment } from './services/bundle-service';
import { ActivatedRoute } from '@angular/router';
import { LoggerService } from 'dotcms-js/dotcms-js';
import './semantic/assets/semantic.js';
export interface ParameterChangeEvent extends CwChangeEvent {
    rule?: RuleModel;
    source?: ServerSideFieldModel;
    name: string;
    value: string;
}
export interface TypeChangeEvent extends CwChangeEvent {
    rule?: RuleModel;
    source: ServerSideFieldModel;
    value: any;
    index: number;
}
export interface RuleActionEvent {
    type: string;
    payload: {
        rule?: RuleModel;
        value?: string | boolean;
    };
}
export interface RuleActionActionEvent extends RuleActionEvent {
    payload: {
        rule?: RuleModel;
        value?: string | boolean;
        ruleAction?: ActionModel;
        index?: number;
        name?: string;
    };
}
export interface ConditionGroupActionEvent extends RuleActionEvent {
    payload: {
        rule?: RuleModel;
        value?: string | boolean;
        conditionGroup?: ConditionGroupModel;
        index?: number;
        priority?: number;
    };
}
export interface ConditionActionEvent extends RuleActionEvent {
    payload: {
        rule?: RuleModel;
        value?: string | boolean;
        condition?: ConditionModel;
        conditionGroup?: ConditionGroupModel;
        index?: number;
        name?: string;
        type?: string;
    };
}
/**
 *
 */
export declare class RuleEngineContainer {
    private _ruleService;
    private _ruleActionService;
    private _conditionGroupService;
    private _conditionService;
    private _resources;
    bundleService: BundleService;
    private route;
    private loggerService;
    rules: RuleModel[];
    state: RuleEngineState;
    environments: IPublishEnvironment[];
    rules$: EventEmitter<RuleModel[]>;
    ruleActions$: EventEmitter<ActionModel[]>;
    conditionGroups$: EventEmitter<ConditionGroupModel[]>;
    globalError: string;
    constructor(_ruleService: RuleService, _ruleActionService: ActionService, _conditionGroupService: ConditionGroupService, _conditionService: ConditionService, _resources: I18nService, bundleService: BundleService, route: ActivatedRoute, loggerService: LoggerService);
    alphaSort(key: any): (a, b) => number;
    /**
   *
   * @param event
   */
    onCreateRule(event: any): void;
    onDeleteRule(event: RuleActionEvent): void;
    onUpdateEnabledState(event: RuleActionEvent): void;
    onUpdateRuleName(event: RuleActionEvent): void;
    onUpdateFireOn(event: RuleActionEvent): void;
    onUpdateExpandedState(event: RuleActionEvent): void;
    onCreateRuleAction(event: RuleActionActionEvent): void;
    onDeleteRuleAction(event: RuleActionActionEvent): void;
    onUpdateRuleActionType(event: RuleActionActionEvent): void;
    onUpdateRuleActionParameter(event: RuleActionActionEvent): void;
    onCreateConditionGroup(event: ConditionGroupActionEvent): void;
    onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void;
    onDeleteConditionGroup(event: ConditionGroupActionEvent): void;
    onCreateCondition(event: ConditionActionEvent): void;
    onUpdateConditionType(event: ConditionActionEvent): void;
    onUpdateConditionParameter(event: ConditionActionEvent): void;
    onUpdateConditionOperator(event: ConditionActionEvent): void;
    onDeleteCondition(event: ConditionActionEvent): void;
    ruleUpdating(rule: any, disable?: boolean): void;
    ruleUpdated(rule: RuleModel, errors?: {
        [key: string]: any;
    }): void;
    patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable?: boolean): void;
    patchRule(rule: RuleModel, disable?: boolean): void;
    patchAction(rule: RuleModel, ruleAction: ActionModel): void;
    patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void;
    prioritySortFn(a: any, b: any): number;
    private preCacheCommonResources(resources);
    private initRules();
    private loadRules(rules);
    private _handle403Error(e);
}
