{"version":3,"file":"pane_controller-B6FMWE4M.js","sources":["../../../app/javascript/controllers/contactables/pane_controller.js"],"sourcesContent":["import PaneController from \"../pane_controller\"\nimport { destroy } from \"@rails/request.js\"\n\nexport default class extends PaneController {\n static values = {\n url: String,\n selectedList: String,\n }\n\n static targets = [\"input\", \"information\", \"form\"]\n\n async destroyResource(e) {\n const response = await destroy(e.target.dataset.url, {\n responseKind: \"turbo-stream\",\n })\n\n if (response.ok) {\n this.hide()\n }\n }\n\n checkFormStatus(e) {\n if (e.detail.success) {\n this.hide()\n }\n }\n\n reset() {\n this.inputTarget.value = \"\"\n }\n\n hide() {\n if (window.location.href.includes(\"campaigns\") && this.hasFormTarget) {\n if (!this.formTarget.classList.contains(\"hidden\")) {\n this.informationTarget.classList.remove(\"hidden\")\n this.formTarget.classList.add(\"hidden\")\n\n return\n }\n }\n\n super.hide()\n }\n}\n"],"names":["pane_controller","PaneController","e","destroy","__publicField"],"mappings":"yPAGe,MAAKA,UAASC,CAAe,CAQ1C,MAAM,gBAAgBC,EAAG,EACN,MAAMC,EAAQD,EAAE,OAAO,QAAQ,IAAK,CACnD,aAAc,cACf,CAAA,GAEY,IACX,KAAK,KAAI,CAEf,CAEE,gBAAgBA,EAAG,CACbA,EAAE,OAAO,SACX,KAAK,KAAI,CAEf,CAEE,OAAQ,CACN,KAAK,YAAY,MAAQ,EAC7B,CAEE,MAAO,CACL,GAAI,OAAO,SAAS,KAAK,SAAS,WAAW,GAAK,KAAK,eACjD,CAAC,KAAK,WAAW,UAAU,SAAS,QAAQ,EAAG,CACjD,KAAK,kBAAkB,UAAU,OAAO,QAAQ,EAChD,KAAK,WAAW,UAAU,IAAI,QAAQ,EAEtC,MACR,CAGI,MAAM,KAAI,CACd,CACA,CAvCEE,EADkBJ,EACX,SAAS,CACd,IAAK,OACL,aAAc,MAClB,GAEEI,EANkBJ,EAMX,UAAU,CAAC,QAAS,cAAe,MAAM"}