{"version":3,"file":"stop_controller-BnEIwPvV.js","sources":["../../../app/javascript/controllers/step/stop_controller.js"],"sourcesContent":["import MessageController from \"./message_controller\"\n\nexport default class extends MessageController {\n static targets = [\"trigger\"]\n\n initialize() {\n super.initialize()\n this.kind = \"stop\"\n }\n\n sync({ detail }) {\n if(detail.stepId !== this.element.id || detail.commit === false) return\n\n this.triggerTarget.classList.remove(\"halo--active\")\n\n if(detail.journeyNames.length) {\n this.containerTarget.innerText = detail.journeyNames.join(\", \")\n } else {\n this.containerTarget.innerText = this.translations.steps.stops.pane.journeys.all\n }\n\n if(!this.persistedValue) {\n this.dispatch(\"saved\", {\n target: document.documentElement\n })\n }\n\n this.stepNameTarget.innerHTML = detail.stepName || t.journeys.new.stop\n this.persistedValue = true\n }\n}\n"],"names":["stop_controller","MessageController","detail","__publicField"],"mappings":"yNAEe,MAAKA,UAASC,CAAkB,CAG7C,YAAa,CACX,MAAM,WAAU,EAChB,KAAK,KAAO,MAChB,CAEE,KAAK,CAAE,OAAAC,GAAU,CACZA,EAAO,SAAW,KAAK,QAAQ,IAAMA,EAAO,SAAW,KAE1D,KAAK,cAAc,UAAU,OAAO,cAAc,EAE/CA,EAAO,aAAa,OACrB,KAAK,gBAAgB,UAAYA,EAAO,aAAa,KAAK,IAAI,EAE9D,KAAK,gBAAgB,UAAY,KAAK,aAAa,MAAM,MAAM,KAAK,SAAS,IAG3E,KAAK,gBACP,KAAK,SAAS,QAAS,CACrB,OAAQ,SAAS,eAClB,CAAA,EAGH,KAAK,eAAe,UAAYA,EAAO,UAAY,EAAE,SAAS,IAAI,KAClE,KAAK,eAAiB,GAC1B,CACA,CA3BEC,EADkBH,EACX,UAAU,CAAC,SAAS"}