import Immutable from "immutable" ; import TemplateBlock from "./templateBlock" ; class TemplateOutput extends Immutable . Record ( { content : String ( ) , blocks : Immutable . Map ( ) , } , "TemplateOutput" ) { getContent ( ) { return this . get ( "content" ) ; } getBlocks ( ) { return this . get ( "blocks" ) ; } /**
     * Update content of this output
     */ setContent ( content ) { return this . set ( "content" , content ) as TemplateOutput ; } /**
     * Create a TemplateOutput from a text content
     * and an object containing block definition
     */ static create ( content , blocks ) { return new TemplateOutput ( { content : content , blocks : Immutable . fromJS ( blocks ) , } ) ; } } export default TemplateOutput ;