{"version":3,"file":"tags_controller-BwbxCPNN.js","sources":["../../../app/javascript/controllers/compose/toolbar/tags_controller.js"],"sourcesContent":["import ApplicationController from '../../application_controller'\n\nexport default class extends ApplicationController {\n static targets = [\"button\", \"menu\"]\n\n onTagClick({ currentTarget }) {\n this.dispatch('insertTag', {\n detail: currentTarget.dataset.tag\n })\n }\n\n enable() {\n super.enable(this.buttonTarget)\n }\n\n disable() {\n super.disable(this.buttonTarget)\n }\n\n onDropdownOpen() {\n this.dispatch('focus')\n }\n\n onDropdownHide() {\n this.dispatch('blur')\n }\n\n closeByEscape(event) {\n if(this.isInvisible(this.menuTarget)) return\n this.buttonTarget.click()\n }\n}\n"],"names":["tags_controller","ApplicationController","currentTarget","event","__publicField"],"mappings":"uNAEe,MAAKA,UAASC,CAAsB,CAGjD,WAAW,CAAE,cAAAC,GAAiB,CAC5B,KAAK,SAAS,YAAa,CACzB,OAAQA,EAAc,QAAQ,GAC/B,CAAA,CACL,CAEE,QAAS,CACP,MAAM,OAAO,KAAK,YAAY,CAClC,CAEE,SAAU,CACR,MAAM,QAAQ,KAAK,YAAY,CACnC,CAEE,gBAAiB,CACf,KAAK,SAAS,OAAO,CACzB,CAEE,gBAAiB,CACf,KAAK,SAAS,MAAM,CACxB,CAEE,cAAcC,EAAO,CAChB,KAAK,YAAY,KAAK,UAAU,GACnC,KAAK,aAAa,MAAK,CAC3B,CACA,CA5BEC,EADkBJ,EACX,UAAU,CAAC,SAAU,MAAM"}