{"version":3,"file":"wallet_controller-DdhNfThC.js","sources":["../../../app/javascript/controllers/business/wallet_controller.js"],"sourcesContent":["import ApplicationController from '../application_controller'\n\nexport default class extends ApplicationController {\n static values = {\n disabled: Boolean,\n }\n\n static targets = [\n 'rechargeAmountInput',\n ]\n\n toggleAutoRecharge(e) {\n this.element.querySelectorAll('input')\n .forEach((el) => {\n if (el.dataset.disableable === \"true\") {\n el.disabled = !this.disabledValue\n }\n })\n\n this.disabledValue = !this.disabledValue\n }\n\n disabledValueChanged() {\n if(!this.disabledValue) {\n this.focus(this.rechargeAmountInputTarget, { moveCursorToEnd: true })\n }\n\n if(this.disabledValue) {\n this.addClass(this.element, 'text-night-60')\n } else {\n this.removeClass(this.element, 'text-night-60')\n }\n }\n}\n"],"names":["wallet_controller","ApplicationController","el","__publicField"],"mappings":"uNAEe,MAAKA,UAASC,CAAsB,CASjD,mBAAmB,EAAG,CACpB,KAAK,QAAQ,iBAAiB,OAAO,EAClC,QAASC,GAAO,CACXA,EAAG,QAAQ,cAAgB,SAC7BA,EAAG,SAAW,CAAC,KAAK,cAEvB,CAAA,EAEH,KAAK,cAAgB,CAAC,KAAK,aAC/B,CAEE,sBAAuB,CACjB,KAAK,eACP,KAAK,MAAM,KAAK,0BAA2B,CAAE,gBAAiB,EAAM,CAAA,EAGnE,KAAK,cACN,KAAK,SAAS,KAAK,QAAS,eAAe,EAE3C,KAAK,YAAY,KAAK,QAAS,eAAe,CAEpD,CACA,CA9BEC,EADkBH,EACX,SAAS,CACd,SAAU,OACd,GAEEG,EALkBH,EAKX,UAAU,CACf,qBACJ"}