(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{13:function(e,t,a){e.exports={poCheckboxLabel:"style_poCheckboxLabel__2IHB4",poCheckboxSpan:"style_poCheckboxSpan__ltXcy",poCheckbox:"style_poCheckbox__3Q56z"}},18:function(e,t,a){e.exports=a(26)},26:function(e,t,a){"use strict";a.r(t);var o=a(8),n=a.n(o),s=a(16),c=a.n(s),r=a(6),i=a(0),d=a(1),l=a(2),u=a(3),p=a(14),h=a(13),b=a.n(h),f=function(e){Object(l.a)(a,e);var t=Object(u.a)(a);function a(e){var o;Object(i.a)(this,a),(o=t.call(this,e)).render=function(){return n.a.createElement("label",{className:b.a.poCheckboxLabel},n.a.createElement("input",{className:b.a.poCheckbox,type:"checkbox",defaultChecked:o.state.defaultChecked,onChange:o._onChange,disabled:o.props.disabled,onFocus:o._onFocus,onBlur:o._onBlur}),n.a.createElement("span",{className:b.a.poCheckboxSpan},"Send Settings"))},o._sendMessageTo=function(){if("undefined"!=typeof window.parent.chrome){if("undefined"==typeof window.parent.chrome.webview)return console.log("[POLLINATION-DEBUG]: webview not found."),o.state;var e={action:"SetModelSettings",data:o.props.args.data},t=JSON.stringify(e);return window.parent.chrome.webview.postMessage(t),e}return console.log("[POLLINATION-DEBUG]: chrome not found."),o.state},o._setStateNow=function(e,t){o.setState((function(a){return Object(r.a)(Object(r.a)({},a),{},{data:e.data,isChecked:t})})),console.log("[POLLINATION-DEBUG]: JSON string sent.")},o._autoUpdate=function(e){setTimeout((function(){var e=o._sendMessageTo();o._setStateNow(e,!0),console.log("[POLLINATION-DEBUG]: auto-update.")}),e)},o._onChange=function(e){var t=e.target.checked;o.setState({isChecked:t})},o._onFocus=function(){o.setState({isFocused:!0})},o._onBlur=function(){o.setState({isFocused:!1})};var s=o.props.args.data,c=o.props.args.defaultChecked,d={data:s,defaultChecked:c,isChecked:!!c,delay:o.props.args.delay};return o.state=Object(r.a)({},d),c&&o._sendMessageTo(),o}return Object(d.a)(a,[{key:"componentDidUpdate",value:function(){this.state.isChecked&&this.state.data!=this.props.args.data&&this._autoUpdate(this.state.delay)}}]),a}(p.a),_=Object(p.b)(f);c.a.render(n.a.createElement(n.a.StrictMode,null,n.a.createElement(_,null)),document.getElementById("root"))}},[[18,1,2]]]);
//# sourceMappingURL=main.ddfac3eb.chunk.js.map