import { ActionFlow } from "./ActionTypes";

export interface IFlowInfo {
    flowid: string;
    name:string;
    content: string;
}

export class FlowInfo implements IFlowInfo{
    flowid: string;
    name:string;
    content: string;    
    constructor({flowid,name,content}:{flowid: string,
        name:string,
        content: string,}) {
            this.flowid=flowid;
            this.name=name;
            this.content=content;
    }
    getFlow():ActionFlow {
        return ActionFlow.fromJSON(this.content)
    }
}