{"version":3,"file":"jump_controller-FaqnP3Cq.js","sources":["../../../app/javascript/controllers/automation/jump_controller.js"],"sourcesContent":["import PropertyController from './property_controller'\n\nexport default class extends PropertyController {\n static targets = ['notice']\n\n save({ detail }) {\n window.paneId = null\n\n this.paneTarget.classList.replace(\"right-0\", \"-right-full\")\n this.triggerTarget.classList.remove(\"halo--active\")\n\n this.paneSnapshot = this.paneTarget.cloneNode(true)\n this.persistedValue = true\n\n this.descriptionTarget.innerHTML = t.automation.jumps.jump.description.replace('%{step}', detail.name)\n this.titleTarget.innerText = detail.sourceName || t.journeys.new.jump\n\n if(this.hasNoticeTarget) {\n this.hide(this.noticeTarget)\n }\n }\n\n abortChanges() {\n if(!this.persistedValue) {\n return this.remove()\n }\n\n this.paneTarget.classList.replace(\"right-0\", \"-right-full\")\n this.triggerTarget.classList.remove(\"halo--active\")\n\n this.delayed(() => {\n this.paneTarget.replaceWith(this.paneSnapshot.cloneNode(true))\n this.paneTarget.querySelector('input.form-control')?.remove()\n }, 300)\n }\n}\n"],"names":["jump_controller","PropertyController","detail","_a","__publicField"],"mappings":"0NAEe,MAAKA,UAASC,CAAmB,CAG9C,KAAK,CAAE,OAAAC,GAAU,CACf,OAAO,OAAS,KAEhB,KAAK,WAAW,UAAU,QAAQ,UAAW,aAAa,EAC1D,KAAK,cAAc,UAAU,OAAO,cAAc,EAElD,KAAK,aAAe,KAAK,WAAW,UAAU,EAAI,EAClD,KAAK,eAAiB,GAEtB,KAAK,kBAAkB,UAAY,EAAE,WAAW,MAAM,KAAK,YAAY,QAAQ,UAAWA,EAAO,IAAI,EACrG,KAAK,YAAY,UAAYA,EAAO,YAAc,EAAE,SAAS,IAAI,KAE9D,KAAK,iBACN,KAAK,KAAK,KAAK,YAAY,CAEjC,CAEE,cAAe,CACb,GAAG,CAAC,KAAK,eACP,OAAO,KAAK,OAAM,EAGpB,KAAK,WAAW,UAAU,QAAQ,UAAW,aAAa,EAC1D,KAAK,cAAc,UAAU,OAAO,cAAc,EAElD,KAAK,QAAQ,IAAM,OACjB,KAAK,WAAW,YAAY,KAAK,aAAa,UAAU,EAAI,CAAC,GAC7DC,EAAA,KAAK,WAAW,cAAc,oBAAoB,IAAlD,MAAAA,EAAqD,QAC3D,EAAO,GAAG,CACV,CACA,CAhCEC,EADkBJ,EACX,UAAU,CAAC,QAAQ"}