(this.webpackJsonpstreamlit_custom_checkbox=this.webpackJsonpstreamlit_custom_checkbox||[]).push([[0],{12:function(e,t,a){"use strict";a.r(t);var s=a(0),i=a.n(s),n=a(3),c=a.n(n),r=a(1);class o extends r.b{constructor(e){super(e),this.handleClick=()=>{if(this.props.args.disabled)return;const e=!this.state.checked;this.setState({checked:e,initialized:!0}),r.a.setComponentValue(e)},this.handleChange=e=>{if(this.props.args.disabled)return;const t=e.target.checked;this.setState({checked:t,initialized:!0}),r.a.setComponentValue(t)},this.state={checked:this.props.args.value||!1,initialized:!1}}componentDidUpdate(e){e.args.value===this.props.args.value||this.state.initialized||this.setState({checked:this.props.args.value||!1,initialized:!0})}render(){const{label:e,value:t,disabled:a}=this.props.args,{checked:s}=this.state,n=s,c={display:"flex",alignItems:"center",border:"2px solid ".concat(n?"#28a745":"#b0b0b0"),backgroundColor:n?"#e6f4ea":"#f8f9fa",padding:"8px 12px",borderRadius:"6px",transition:"all 0.2s ease",margin:"5px 0 15px 0",width:"fit-content",cursor:a?"not-allowed":"pointer",opacity:a?.6:1};return i.a.createElement("div",{style:c,onClick:this.handleClick},i.a.createElement("input",{type:"checkbox",checked:n,disabled:a,onChange:this.handleChange,style:{marginRight:"8px",width:"18px",height:"18px",accentColor:"#28a745"}}),i.a.createElement("label",{style:{margin:0,userSelect:"none"}},e))}componentDidMount(){r.a.setFrameHeight(70),r.a.setComponentValue(this.state.checked)}}var l=Object(r.c)(o);c.a.render(i.a.createElement(i.a.StrictMode,null,i.a.createElement(l)),document.getElementById("root"))},5:function(e,t,a){e.exports=a(12)}},[[5,1,2]]]);
//# sourceMappingURL=main.dde18032.chunk.js.map