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