{"version":3,"file":"journey_controller-BAvZw3lE.js","sources":["../../../app/javascript/controllers/capture/assignment/journey_controller.js"],"sourcesContent":["import ApplicationController from '@/controllers/application_controller'\n\nexport default class extends ApplicationController {\n static targets = [\n 'trigger',\n 'option',\n 'input',\n ]\n\n assign({ currentTarget }) {\n if(currentTarget.querySelector('[data-placeholder]')) {\n const placeholder = currentTarget.querySelector('[data-placeholder]').cloneNode(true)\n placeholder.classList.remove('hidden')\n\n this.triggerTarget.innerHTML = placeholder.outerHTML\n } else {\n this.triggerTarget.innerHTML = currentTarget.dataset.placeholder\n }\n\n this.optionTargets.forEach(option => {\n if(option === currentTarget) {\n option.classList.add('bg-lavender-light')\n } else {\n option.classList.remove('bg-lavender-light')\n }\n })\n\n this.inputTarget.value = currentTarget.dataset.optionValue\n }\n}\n"],"names":["journey_controller","ApplicationController","currentTarget","placeholder","option","__publicField"],"mappings":"uNAEe,MAAKA,UAASC,CAAsB,CAOjD,OAAO,CAAE,cAAAC,GAAiB,CACxB,GAAGA,EAAc,cAAc,oBAAoB,EAAG,CACpD,MAAMC,EAAcD,EAAc,cAAc,oBAAoB,EAAE,UAAU,EAAI,EACpFC,EAAY,UAAU,OAAO,QAAQ,EAErC,KAAK,cAAc,UAAYA,EAAY,SACjD,MACM,KAAK,cAAc,UAAYD,EAAc,QAAQ,YAGvD,KAAK,cAAc,QAAQE,GAAU,CAChCA,IAAWF,EACZE,EAAO,UAAU,IAAI,mBAAmB,EAExCA,EAAO,UAAU,OAAO,mBAAmB,CAE9C,CAAA,EAED,KAAK,YAAY,MAAQF,EAAc,QAAQ,WACnD,CACA,CA1BEG,EADkBL,EACX,UAAU,CACf,UACA,SACA,OACJ"}