"use strict"; const Dragonfly = global.Dragonfly; const cl = global.botanLoader; const doT = require("dot"); const OChain = cl.load( "botansx.mvc.model.chain" ); class Chain extends OChain { HFC( viewData, hfData, handler ) { var _self = this; viewData.modules.unshift( "Astro.Starfall.Element.Header" , "Astro.Starfall.Layout.MainFrame" , "Astro.Starfall.Element.Footer" ); var options = hfData.templating || {}; var chainHandler = function( def, data, _class ) { var view = doT.template( data, options[ _class ], _self.utils ); viewData["footer"] = view( hfData ); handler(); }; var chainFooter = function( def, data, _class ) { var view = doT.template( data, options[ _class ], _self.utils ); viewData["header"] = view( hfData ); _self.Template( "Element.Footer", chainHandler ); }; this.Template( "Element.Header", chainFooter ); } } module.exports = Chain;