{"version":3,"file":"DelayedRender.a5679184.js","sources":["../../../node_modules/@fluentui/utilities/lib/DelayedRender.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport * as React from 'react';\nimport { getWindow } from './dom/getWindow';\n/**\n * Utility component for delaying the render of a child component after a given delay. This component\n * requires a single child component; don't pass in many components. Wrap multiple components in a DIV\n * if necessary.\n *\n * @public\n * {@docCategory DelayedRender}\n */\nexport var DelayedRender = /** @class */ (function (_super) {\n __extends(DelayedRender, _super);\n function DelayedRender(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n isRendered: getWindow() === undefined,\n };\n return _this;\n }\n DelayedRender.prototype.componentDidMount = function () {\n var _this = this;\n var delay = this.props.delay;\n // eslint-disable-next-line no-restricted-globals\n this._timeoutId = window.setTimeout(function () {\n _this.setState({\n isRendered: true,\n });\n }, delay);\n };\n DelayedRender.prototype.componentWillUnmount = function () {\n if (this._timeoutId) {\n clearTimeout(this._timeoutId);\n }\n };\n DelayedRender.prototype.render = function () {\n return this.state.isRendered ? React.Children.only(this.props.children) : null;\n };\n DelayedRender.defaultProps = {\n delay: 0,\n };\n return DelayedRender;\n}(React.Component));\n//# sourceMappingURL=DelayedRender.js.map"],"names":["DelayedRender","_super","__extends","props","_this","getWindow","delay","React.Children","React.Component"],"mappings":"sEAWU,IAACA,EAA+B,SAAUC,EAAQ,CACxDC,EAAUF,EAAeC,CAAM,EAC/B,SAASD,EAAcG,EAAO,CAC1B,IAAIC,EAAQH,EAAO,KAAK,KAAME,CAAK,GAAK,KACxC,OAAAC,EAAM,MAAQ,CACV,WAAYC,EAAS,IAAO,MACxC,EACeD,CACV,CACD,OAAAJ,EAAc,UAAU,kBAAoB,UAAY,CACpD,IAAII,EAAQ,KACRE,EAAQ,KAAK,MAAM,MAEvB,KAAK,WAAa,OAAO,WAAW,UAAY,CAC5CF,EAAM,SAAS,CACX,WAAY,EAC5B,CAAa,CACJ,EAAEE,CAAK,CAChB,EACIN,EAAc,UAAU,qBAAuB,UAAY,CACnD,KAAK,YACL,aAAa,KAAK,UAAU,CAExC,EACIA,EAAc,UAAU,OAAS,UAAY,CACzC,OAAO,KAAK,MAAM,WAAaO,EAAc,SAAC,KAAK,KAAK,MAAM,QAAQ,EAAI,IAClF,EACIP,EAAc,aAAe,CACzB,MAAO,CACf,EACWA,CACX,EAAEQ,WAAe","x_google_ignoreList":[0]}