
/* Smart UI v14.2.101 (2022-09-23) 
Copyright (c) 2011-2021 jQWidgets. 
License: https://htmlelements.com/license/ */ //

Smart("smart-led",class extends Smart.ToggleButton{static get properties(){return{shape:{value:"round",allowedValues:["round","square"],type:"string"}}}static get styleUrls(){return["smart.led.css"]}template(){return"<div id='container' class='smart-container' role=\"presentation\">\n                    <div id='ledAnimation' class='smart-animation' role=\"presentation\"></div>\n                    <div id='button' class='smart-input' role=\"presentation\">\n                        <span id='falseContentContainer' inner-h-t-m-l='[[falseContent]]' class='smart-false-content-container'></span>\n                        <span id='indeterminateContentContainer' inner-h-t-m-l='[[indeterminateContent]]' class='smart-indeterminate-content-container'></span>\n                        <span id='trueContentContainer' inner-h-t-m-l='[[trueContent]]' class='smart-true-content-container'></span>\n                    </div>\n                    <input id='hiddenInput' class='smart-hidden-input' type='hidden'>\n                </div>"}ready(){const e=this;super.ready(),e._htmlBindOnInitialization(),e.indeterminate&&(e._valueCashe=e.checked,e.checked=null),e._handleTemplate(!0),e._handleTemplate(!1),e._handleTemplate(),e._updateHidenInputNameAndValue()}propertyChangedHandler(e,n,t){super.propertyChangedHandler(e,n,t);const a=this;switch(e){case"indeterminate":t?(a._valueCashe=a.checked,a.checked=null):a.checked=a._valueCashe,a._updateHidenInputNameAndValue();break;case"trueContent":a.trueContent=t,a._handleTemplate(!0);break;case"falseContent":a.falseContent=t,a._handleTemplate(!1);break;case"indeterminateContent":a.indeterminateContent=t,a._handleTemplate();break;case"value":case"checked":a._updateHidenInputNameAndValue();break;case"name":a._updateHidenInputName()}}_documentUpHandler(e){const n=this;if(n._pressed&&!n.readonly){if("press"===n.clickMode)return e.preventDefault(),e.stopPropagation(),void(n._pressed=!1);super._documentUpHandler(e),n.indeterminate=!1,n._updateHidenInputNameAndValue(),n._pressed=!1}}_mouseDownHandler(){const e=this;e.readonly||e.disabled||(e._pressed=!0,"press"!==e.clickMode&&"pressAndRelease"!==e.clickMode||(e._changeCheckState("pointer"),e.$.fireEvent("click"),e.indeterminate=!1,e._updateHidenInputNameAndValue()))}});