{"version":3,"file":"compose_controller-BC2F1BzS.js","sources":["../../../app/javascript/controllers/conversations/compose_controller.js"],"sourcesContent":["import ApplicationController from '../application_controller'\n\nexport default class extends ApplicationController {\n static targets = [\n 'form',\n 'compose',\n ]\n\n submit({ detail: composeSnapshot }) {\n const { template, templateChanged } = composeSnapshot\n\n if(template && ['medium', 'low'].includes(template.quality) && !templateChanged) {\n this.dispatch('show', {\n target: this.element,\n detail: template.quality,\n })\n } else {\n this.formTarget.requestSubmit()\n }\n }\n\n submitAnyway() {\n this.formTarget.requestSubmit()\n }\n\n editTemplate() {\n this.dispatch('edit', {\n target: this.composeTarget,\n })\n }\n}\n"],"names":["compose_controller","ApplicationController","composeSnapshot","template","templateChanged","__publicField"],"mappings":"uNAEe,MAAKA,UAASC,CAAsB,CAMjD,OAAO,CAAE,OAAQC,GAAmB,CAClC,KAAM,CAAE,SAAAC,EAAU,gBAAAC,GAAoBF,EAEnCC,GAAY,CAAC,SAAU,KAAK,EAAE,SAASA,EAAS,OAAO,GAAK,CAACC,EAC9D,KAAK,SAAS,OAAQ,CACpB,OAAQ,KAAK,QACb,OAAQD,EAAS,OAClB,CAAA,EAED,KAAK,WAAW,cAAa,CAEnC,CAEE,cAAe,CACb,KAAK,WAAW,cAAa,CACjC,CAEE,cAAe,CACb,KAAK,SAAS,OAAQ,CACpB,OAAQ,KAAK,aACd,CAAA,CACL,CACA,CA3BEE,EADkBL,EACX,UAAU,CACf,OACA,SACJ"}