!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","./common","./constants","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=e("tslib"),y=h.__importDefault(e("react")),v=e("./common"),_=e("./constants"),b=e("./utils");t.default=y.default.forwardRef(function(e,t){var l=e.children,o=e.className,n=e.component,r=e.element,s=e.errorClassName,a=e.htmlElementType,i=h.__rest(e,["children","className","component","element","errorClassName","htmlElementType"]),p=n.props.host,d=[],u=b.makeUniqueId(n.props.name),m=v.renderTitle(r,p,u),c=v.renderDescription(r,p,u),f=v.renderError(r,p),n=null===(e=null==m?void 0:m.props)||void 0===e?void 0:e.id,e=null===(p=null==c?void 0:c.props)||void 0===p?void 0:p.id,p=[];o&&p.push.apply(p,o.split(" ")),r.titleLocation===_.TitleLocation.BESIDE&&p.push("inline-title"),r.styleName&&p.push(b.makeSafeClassName(r.styleName)),f&&s&&p.push(s);i=h.__assign({"aria-labelledby":n,"aria-describedby":e,className:p.join(" "),id:u,ref:t},i);return d.push(m),r.titleLocation===_.TitleLocation.BESIDE?d.push(y.default.createElement("div",{className:"form-element-content"},c,f,l)):(d.push(c),d.push(f),d.push(l)),y.default.createElement.apply(y.default,h.__spreadArrays([a||"div",i],d))})});