define(["require","exports","tslib","react","react-dom","./renderers","./FormComponent"],function(e,r,n,t,o,a,u){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),t=n.__importDefault(t),o=n.__importDefault(o),a=n.__importStar(a),r.refresh=function(e){e instanceof u.FormComponent&&e.forceUpdate()},r.refreshForm=function(e,r){o.default.render(t.default.createElement(u.FormComponent,{host:e,type:"form"}),r)},r.releaseForm=function(e){o.default.unmountComponentAtNode(e)},r.render=function(e){if(e instanceof u.FormComponent){switch(e.props.type){case"form":return a.renderForm(e);case"header":return a.renderHeader(e);case"main":return a.renderMain(e);case"footer":return a.renderFooter(e);case"body":return a.renderBody(e);case"row":return a.renderRow(e);case"section":return a.element.renderSection(e,e.prepare());case"element":break;default:return}var r=e.prepare();if(null==r)return;var n=r.type;if("string"!=typeof n)return;if("Custom"===n)return e.props.host.renderCustom(e,r);if(e.elementRegistration)return t.default.createElement(e.elementRegistration.component,a.getElementProps(e,r));n=a.element["render"+n];if("function"==typeof n)return n(e,r)}},r.renderNone=function(e){if(e instanceof u.FormComponent)return a.renderNone(e)}});