import { AlterStatePropObjType, AwaitBehaviorType, ChangeWalletEnvType, ClosePageObjType, CloseProPageObjType, OpenPageObjType, RefreshBoxObjType, StorageDataBehaviorType } from "lowcode/_setters/cBehavior-setter/type";
import { newDataSourceListItemType } from "lowcode/_setters/cDataSource-setter/type";
import { RequestParamMappingDataType } from "lowcode/_setters/cTreeDataRelation-setter/type";
import { ConditionType, SelectRelateType } from "lowcode/_utils/conditionRenderService/type";
import { RowLogicDetail } from "lowcode/_utils/logicRenderService/type";
import { BehaviorType } from "src/utils/CLowCodeService/type";
export interface FlowPageProps {
    flowData?: FlowNode;
}
interface SetterPanelProps {
    current: FlowNode;
    onChange: Function;
}
export interface ConditionSetterPanelProps extends SetterPanelProps {
    current: ConditionFlowNode;
}
export interface EventFlowSetterPanelProps extends SetterPanelProps {
    current: ExtentEventFlowNode;
}
export interface ConditionFlowNode extends FlowNode {
    config: {
        detail: RowLogicDetail;
    };
}
/**
 * 用于扩展额外的事件流节点
 */
export interface ExtentEventFlowNode extends FlowNode {
    config: {
        type: FlowEventSelectType;
        flowComponentKey: string;
        parentFlowEventNameList: string[];
        flowComponentType?: string;
        flowNodeId?: string;
    };
}
export interface ActionSetterPanelProps extends SetterPanelProps {
    current: ActionFlowNode;
}
export interface ActionFlowNode extends FlowNode {
    config: ActionNodeConfig;
}
export type ActionNodeConfigDataType = ClosePageObjType | AlterStatePropObjType | newDataSourceListItemType[] | OpenPageObjType | RefreshBoxObjType[] | RequestParamMappingDataType | AwaitBehaviorType | CloseProPageObjType | StorageDataBehaviorType | ChangeWalletEnvType | null;
export interface ActionNodeConfig {
    type: BehaviorType;
    data: ActionNodeConfigDataType;
}
export interface RuleSetterPanelProps extends SetterPanelProps {
    current: RuleFlowNode;
}
export interface RuleFlowNode extends FlowNode {
    config: RuleBoxObjType;
}
export declare enum FlowEvent {
    root = "root",
    start = "start",
    condition = "condition",
    /**
    * 插入条件
    */
    conditionInsert = "conditionInsert",
    conditionElse = "conditionElse",
    action = "action",
    /**
    * 插入动作
    */
    actionInsert = "actionInsert",
    event = "event",
    addItem = "add-item",
    removeItem = "remove-item",
    end = "end",
    success = "success",
    error = "error",
    finally = "finally",
    /**
     * 流程图强行添加异常节点
     */
    abnormal = "abnormal",
    /**
     * 规则
     */
    rule = "rule",
    /**
     * 插入规则
     */
    ruleInsert = "ruleInsert",
    /**
     * 加载
     */
    rulePre = "rulePre",
    /**
     * 前置
     */
    ruleBefore = "ruleBefore",
    /**
     * 后置
     */
    ruleAfter = "ruleAfter",
    /**
     * 删除当前节点
     */
    deleteContent = "deleteContent",
    /**
     * 删除当前及以后
     */
    deleteAfter = "deleteAfter",
    /**
     * 插入
     */
    insert = "insert",
    /**
     * 事件流节点用于对其其他事件流
     */
    eventFlowNode = "eventFlowNode"
}
export interface Menu {
    /**
     * 菜单key
     */
    key: string;
    /**
     * 菜单描述
     */
    label: string;
    /**
     * 即将生成的节点类型
     */
    nodeType?: string;
    /**
     * 将生成的节点名称
     */
    nodeName?: string;
    /**
     * 如果节点为条件节点，每个菜单表示一个条件
     */
    conditionId?: string;
}
export interface FlowNode {
    /**
     * 节点id
     */
    id: string;
    /**
     * 节点描述
     */
    label: string;
    /**
     * 节点类型
     */
    type: string;
    /**
     * 节点菜单
     */
    menus: Menu[];
    /**
     * 节点子节点
     */
    children?: FlowNode[];
    /**
     * 节点额外配置
     * 主要记录setter-panel数据内容
     */
    config?: any;
    /**
     * 节点条件结果
     */
    conditionResult?: boolean;
    /**
     * 记录父节点部分数据
     */
    parentConfig?: FlowNodeConfig;
    /**
     * 未事件type提供不同的key
     * 除事件以为的其他节点，key等同于type
     */
    key?: string;
}
export interface FlowNodeConfig {
    /**
       * 整体连路的key,用于判断当前连路上都有啥
       * 需要支持历史数据
   */
    parentKeys?: string[];
    /**
     * 父级节点ID
     */
    parentId?: string | null;
}
export type FlowBaseNode = Omit<FlowNode, 'id'>;
export interface ConditionDialogRenderProps {
    value: RowLogicDetail;
    onChange: Function;
    detailsBtnText?: string;
    resetBtnText?: string;
    conditionType?: ConditionType;
    selectRelate?: SelectRelateType;
    selectRowRelate?: SelectRelateType;
}
export interface ConditionDialogInfo {
    visible: boolean;
    title: string;
    detailConfig: RowLogicDetail;
}
export interface RuleNodeGroupConfigType {
    ruleGroupId: string;
    ruleConfig: {
        config: RuleBoxObjType;
    };
}
export interface RuleBoxObjType {
    chainId: number;
    pluginProjectId: number;
    pluginProjectViewId: number;
    projectId: number;
    pluginId: number;
    pbiId: number | undefined;
    ruleId: number | undefined;
    handlerName?: string;
    pageKey: string;
    viewKey: string;
    apiParams: Array<RequestParamMappingDataType>;
    groupIds: string[];
}
export type ruleBoxObjOtherType = Omit<RuleBoxObjType, 'chainId' | 'ruleId' | 'pbiId' | 'handlerName' | 'pageKey' | 'viewKey' | 'apiParams' | 'groupIds'>;
export interface SelectOption {
    label: string;
    value: string;
}
export interface SelectInstanceOptions extends SelectOption {
    pluginProjectId: number;
    pluginProjectViewId: number;
}
export interface SelectEmbedOptions extends SelectOption {
    viewJson: string;
}
export interface FlowContextType {
    pluginId?: number;
    projectId?: number;
    /**
     * 用于过滤节点事件流嵌套自己
     */
    componentKey?: string;
}
export interface RuleNodeGroupOptions extends SelectOption {
    config: RuleBoxObjType;
    eventFlowId: string;
}
export declare enum OriginConfigType {
    private = 0,
    common = 1
}
export declare enum FlowEventSelectType {
    /**
     * 当前页面
     */
    current = "current",
    /**
     * 父级页面
     */
    parent = "parent"
}
export {};
