{"version":3,"file":"useDraggable-DTjokSs_.js","sources":["../../../app/javascript/controllers/mixins/useDraggable.js"],"sourcesContent":["export const useDraggable = (controller) => {\n Object.assign(controller, {\n enableDragging() {\n this.draggable.classList.add(...this.dragClasses)\n this.dragging = true\n\n this.afterDragEnabled()\n },\n disableDragging(e) {\n if (this.element.contains(e.target) === false && this.dragging) {\n this.dragging = false\n this.draggable.classList.remove(...this.dragClasses)\n this.afterDragDisabled()\n }\n },\n })\n}\n"],"names":["useDraggable","controller","e"],"mappings":"AAAY,MAACA,EAAgBC,GAAe,CAC1C,OAAO,OAAOA,EAAY,CACxB,gBAAiB,CACf,KAAK,UAAU,UAAU,IAAI,GAAG,KAAK,WAAW,EAChD,KAAK,SAAW,GAEhB,KAAK,iBAAgB,CACtB,EACD,gBAAgBC,EAAG,CACb,KAAK,QAAQ,SAASA,EAAE,MAAM,IAAM,IAAS,KAAK,WACpD,KAAK,SAAW,GAChB,KAAK,UAAU,UAAU,OAAO,GAAG,KAAK,WAAW,EACnD,KAAK,kBAAiB,EAEzB,CACF,CAAA,CACH"}