{"version":3,"file":"import_templates_controller-CWH89ZzJ.js","sources":["../../../app/javascript/controllers/whatsapp/import_templates_controller.js"],"sourcesContent":["import NotificationEventsController from '../notification/events_controller'\n\nexport default class extends NotificationEventsController {\n static values = {\n state: String,\n }\n\n static targets = ['importAll', 'autoImport', 'autoImportButton']\n\n connect() {\n super.connect()\n\n this.updateSubmitButtonLabel()\n }\n\n autoImportValueChanged() {\n this.updateSubmitButtonLabel()\n }\n\n updateSubmitButtonLabel() {\n if(this.autoImportTarget.checked || (this.hasImportAllTarget && this.importAllTarget.checked) || this.checkboxTargets.some(checkbox => checkbox.checked)) {\n this.show(this.submitTarget)\n this.hide(this.skipTarget)\n } else {\n this.hide(this.submitTarget)\n this.show(this.skipTarget)\n }\n }\n\n syncSubmitButton() {\n }\n\n get draft() {\n return this.stateValue === 'draft'\n }\n}\n"],"names":["import_templates_controller","NotificationEventsController","checkbox","__publicField"],"mappings":"wNAEe,MAAKA,UAASC,CAA6B,CAOxD,SAAU,CACR,MAAM,QAAO,EAEb,KAAK,wBAAuB,CAChC,CAEE,wBAAyB,CACvB,KAAK,wBAAuB,CAChC,CAEE,yBAA0B,CACrB,KAAK,iBAAiB,SAAY,KAAK,oBAAsB,KAAK,gBAAgB,SAAY,KAAK,gBAAgB,KAAKC,GAAYA,EAAS,OAAO,GACrJ,KAAK,KAAK,KAAK,YAAY,EAC3B,KAAK,KAAK,KAAK,UAAU,IAEzB,KAAK,KAAK,KAAK,YAAY,EAC3B,KAAK,KAAK,KAAK,UAAU,EAE/B,CAEE,kBAAmB,CACrB,CAEE,IAAI,OAAQ,CACV,OAAO,KAAK,aAAe,OAC/B,CACA,CAhCEC,EADkBH,EACX,SAAS,CACd,MAAO,MACX,GAEEG,EALkBH,EAKX,UAAU,CAAC,YAAa,aAAc,kBAAkB"}