{"version":3,"file":"business_controller-C6gkUUxM.js","sources":["../../../app/javascript/controllers/admin/business_controller.js"],"sourcesContent":["import ApplicationController from '../application_controller'\n\nexport default class extends ApplicationController {\n static targets = [\n 'campaignsCount',\n 'campaignsCountParagraph',\n 'decrement',\n ]\n\n decrementTargetConnected() {\n this.decrementTarget.remove()\n\n const count = parseInt(this.campaignsCountTarget.textContent) - 1\n\n if(count === 0) {\n return this.hide(this.campaignsCountParagraphTarget, this.campaignsCountTarget)\n }\n\n this.campaignsCountTarget.textContent = count\n\n if(count === 1) {\n this.campaignsCountParagraphTarget.textContent = t.admin.businesses.business.upcoming_campaigns.one\n } else {\n this.campaignsCountParagraphTarget.textContent = t.admin.businesses.business.upcoming_campaigns.other.replace('%{count}', count)\n }\n }\n}\n"],"names":["business_controller","ApplicationController","count","__publicField"],"mappings":"uNAEe,MAAKA,UAASC,CAAsB,CAOjD,0BAA2B,CACzB,KAAK,gBAAgB,OAAM,EAE3B,MAAMC,EAAQ,SAAS,KAAK,qBAAqB,WAAW,EAAI,EAEhE,GAAGA,IAAU,EACX,OAAO,KAAK,KAAK,KAAK,8BAA+B,KAAK,oBAAoB,EAGhF,KAAK,qBAAqB,YAAcA,EAErCA,IAAU,EACX,KAAK,8BAA8B,YAAc,EAAE,MAAM,WAAW,SAAS,mBAAmB,IAEhG,KAAK,8BAA8B,YAAc,EAAE,MAAM,WAAW,SAAS,mBAAmB,MAAM,QAAQ,WAAYA,CAAK,CAErI,CACA,CAvBEC,EADkBH,EACX,UAAU,CACf,iBACA,0BACA,WACJ"}