{"version":3,"file":"snooze_controller-CFDGtmJw.js","sources":["../../../app/javascript/controllers/conversations/snooze_controller.js"],"sourcesContent":["import ApplicationController from '../application_controller'\n\nexport default class extends ApplicationController {\n static values = {\n hour: { type: String, default: '10:00' },\n date: { type: String, default: '' }\n }\n\n static targets = [\n 'commitInput',\n 'customSnoozeSubmitButton'\n ]\n\n submit({ currentTarget }) {\n this.commitInputTarget.value = currentTarget.dataset.value\n this.element.requestSubmit()\n\n // this.element.setAttribute('data-dropdown-open-value', false)\n\n if(!currentTarget.dataset.value) {\n this.dispatch('custom')\n }\n }\n\n enable({ target }) {\n this.dateValue = target.value\n }\n\n sync({ detail: value }) {\n console.log(value, 'is value')\n this.hourValue = value\n }\n\n dateValueChanged() {\n this.customSnoozeSubmitButtonTarget.disabled = !this.hourValue || !this.dateValue\n }\n\n hourValueChanged() {\n this.customSnoozeSubmitButtonTarget.disabled = !this.hourValue || !this.dateValue\n }\n}\n"],"names":["snooze_controller","ApplicationController","currentTarget","target","value","__publicField"],"mappings":"uNAEe,MAAKA,UAASC,CAAsB,CAWjD,OAAO,CAAE,cAAAC,GAAiB,CACxB,KAAK,kBAAkB,MAAQA,EAAc,QAAQ,MACrD,KAAK,QAAQ,cAAa,EAItBA,EAAc,QAAQ,OACxB,KAAK,SAAS,QAAQ,CAE5B,CAEE,OAAO,CAAE,OAAAC,GAAU,CACjB,KAAK,UAAYA,EAAO,KAC5B,CAEE,KAAK,CAAE,OAAQC,GAAS,CACtB,QAAQ,IAAIA,EAAO,UAAU,EAC7B,KAAK,UAAYA,CACrB,CAEE,kBAAmB,CACjB,KAAK,+BAA+B,SAAW,CAAC,KAAK,WAAa,CAAC,KAAK,SAC5E,CAEE,kBAAmB,CACjB,KAAK,+BAA+B,SAAW,CAAC,KAAK,WAAa,CAAC,KAAK,SAC5E,CACA,CArCEC,EADkBL,EACX,SAAS,CACd,KAAM,CAAE,KAAM,OAAQ,QAAS,OAAS,EACxC,KAAM,CAAE,KAAM,OAAQ,QAAS,EAAE,CACrC,GAEEK,EANkBL,EAMX,UAAU,CACf,cACA,0BACJ"}