(window["webpackJsonpstreamlit-browser"]=window["webpackJsonpstreamlit-browser"]||[]).push([[41],{2215:function(e,t,a){"use strict";a.r(t);var n=a(62),l=a(5),o=a(10),r=a(13),i=a(11),s=a(12),u=a(0),c=a.n(u),p=a(1169),d=a(16),f=function(e){function t(){var e,a;Object(l.a)(this,t);for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return(a=Object(r.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(s)))).state={value:a.props.element.get("default")},a.setWidgetValue=function(e){var t=a.props.element.get("id");a.props.widgetMgr.setIntValue(t,a.state.value,e)},a.onChange=function(e){if(0!==e.value.length){var t=Object(n.a)(e.value,1)[0];a.setState({value:parseInt(t.value,10)},function(){return a.setWidgetValue({fromUi:!0})})}else Object(d.d)("No value selected!")},a.filterOptions=function(e,t){return e.filter(function(e){return e.label.toLowerCase().includes(t.toString().toLowerCase())})},a.render=function(){var e={width:a.props.width},t=a.props.element.get("label"),n=a.props.element.get("options"),l=a.props.disabled,o=[{label:n.size>0?n.get(a.state.value):"No options to select.",value:a.state.value.toString()}];0===n.size&&(n=["No options to select."],l=!0);var r=[];return n.forEach(function(e,t){return r.push({label:e,value:t.toString()})}),c.a.createElement("div",{className:"Widget row-widget stSelectbox",style:e},c.a.createElement("label",null,t),c.a.createElement(p.Select,{clearable:!1,disabled:l,labelKey:"label",onChange:a.onChange,options:r,filterOptions:a.filterOptions,value:o,valueKey:"value"}))},a}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.setWidgetValue({fromUi:!1})}}]),t}(c.a.PureComponent);a.d(t,"default",function(){return f})}}]);
//# sourceMappingURL=41.b7b4f4db.chunk.js.map