(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{17:function(t,o,e){t.exports={poButton:"style_poButton__3x8Ka"}},18:function(t,o,e){t.exports=e(26)},26:function(t,o,e){"use strict";e.r(o);var n=e(8),a=e.n(n),r=e(15),s=e.n(r),i=e(6),p=e(0),u=e(1),c=e(2),l=e(3),d=e(13),m=e(17),f=e.n(m),g=function(t){Object(c.a)(e,t);var o=Object(l.a)(e);function e(t){var n;Object(u.a)(this,e),(n=o.call(this,t)).render=function(){var t={BakeGeometry:"Bake Geometry",ClearGeometry:"Clear Geometry",DrawGeometry:"Draw Geometry",DisableDraw:"Disable Draw",BakePollinationModel:"Bake Pollination Model"};return a.a.createElement("span",null,n.props.args.action in t&&a.a.createElement("button",{className:f.a.poButton,onClick:n._onClicked,disabled:n.props.disabled,onFocus:n._onFocus,onBlur:n._onBlur},a.a.createElement("span",null,a.a.createElement("img",{style:{margin:"0px 3px 2px 0px"},src:"./img/pollination.png",alt:"logo"})),t[n.props.args.action]))},n._onClicked=function(){var t=n.props.args.platform,o={platform:t};"Rhino"==t?o=n._dotNetRun():"Sketchup"==t&&(o=n._rubyRun()),n._setStateNow(o)},n._rubyRun=function(){if("undefined"!=typeof window.parent.sketchup){var t={action:n.props.args.action,data:n.props.args.data,uniqueId:n.props.args.uniqueId,options:n.props.args.options},o=JSON.stringify(t);window.parent.sketchup.send_geometry(o);var e={action:t.action,data:t.data,uniqueId:t.uniqueId,options:t.options,platform:n.props.args.platform};return console.log("[POLLINATION-DEBUG]: JSON string sent."),e}return console.log("[POLLINATION-DEBUG]: sketchup not found."),n.state},n._dotNetRun=function(){if("undefined"!=typeof window.parent.chrome){if("undefined"==typeof window.parent.chrome.webview)return console.log("[POLLINATION-DEBUG]: webview not found."),n.state;var t={action:n.props.args.action,data:n.props.args.data,uniqueId:n.props.args.uniqueId,options:n.props.args.options},o=JSON.stringify(t);window.parent.chrome.webview.postMessage(o);var e={action:t.action,data:t.data,uniqueId:t.uniqueId,options:t.options,platform:n.props.args.platform};return console.log("[POLLINATION-DEBUG]: JSON string sent."),e}return console.log("[POLLINATION-DEBUG]: chrome not found."),n.state},n._setStateNow=function(t){n.setState((function(o){return Object(i.a)(Object(i.a)({},o),{},{action:t.action,data:t.data,uniqueId:t.uniqueId,options:t.options})}),(function(){return d.a.setComponentValue(n.state.action)}))},n._onFocus=function(){n.setState({isFocused:!0})},n._onBlur=function(){n.setState({isFocused:!1})};var r={action:n.props.args.action,data:n.props.args.data,uniqueId:n.props.args.uniqueId,options:n.props.args.options,platform:n.props.args.platform};return n.state=Object(i.a)({},r),n}return Object(p.a)(e)}(d.b),w=Object(d.c)(g);s.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(w,null)),document.getElementById("root"))}},[[18,1,2]]]);
//# sourceMappingURL=main.9f0ed46e.chunk.js.map