{"version":3,"file":"audience_list_item_controller-B25EmEQZ.js","sources":["../../../app/javascript/controllers/audience_list_item_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = {\n name: String,\n id: String,\n subscribersCount: Number,\n resetOnClick: Boolean,\n included: Boolean,\n type: String,\n }\n\n select() {\n let event = new CustomEvent(\"audience-selected\", {\n bubbles: true,\n cancelable: true,\n })\n\n event.element = {\n subscribersCount: this.subscribersCountValue,\n id: this.idValue,\n name: this.nameValue,\n resetOnClick: this.resetOnClickValue,\n include: this.includedValue,\n type: this.typeValue,\n }\n\n if (this.nameValue === \"All Audience\") {\n const event = new CustomEvent(\"all-audience-selected\")\n event.subscribersCount = this.subscribersCountValue\n event.resetOnClick = this.resetOnClickValue\n event.name = \"All Audience\"\n window.dispatchEvent(event)\n } else {\n this.element.dispatchEvent(event)\n }\n }\n}\n"],"names":["audience_list_item_controller","Controller","event","__publicField"],"mappings":"4MAEe,MAAKA,UAASC,CAAW,CAUtC,QAAS,CACP,IAAIC,EAAQ,IAAI,YAAY,oBAAqB,CAC/C,QAAS,GACT,WAAY,EACb,CAAA,EAWD,GATAA,EAAM,QAAU,CACd,iBAAkB,KAAK,sBACvB,GAAI,KAAK,QACT,KAAM,KAAK,UACX,aAAc,KAAK,kBACnB,QAAS,KAAK,cACd,KAAM,KAAK,SACjB,EAEQ,KAAK,YAAc,eAAgB,CACrC,MAAMA,EAAQ,IAAI,YAAY,uBAAuB,EACrDA,EAAM,iBAAmB,KAAK,sBAC9BA,EAAM,aAAe,KAAK,kBAC1BA,EAAM,KAAO,eACb,OAAO,cAAcA,CAAK,CAChC,MACM,KAAK,QAAQ,cAAcA,CAAK,CAEtC,CACA,CAlCEC,EADkBH,EACX,SAAS,CACd,KAAM,OACN,GAAI,OACJ,iBAAkB,OAClB,aAAc,QACd,SAAU,QACV,KAAM,MACV"}