{"version":3,"sources":["webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/src/views/widgets/dashboardNotificationItemWidget/js/dashboardNotificationItemWidget.js"],"names":["DashboardNotificationItemWidget","_createClass","element","_this","this","_classCallCheck","$element","$","closeBtn","find","concat","id","data","notificationReadApi","on","fadeOut","ajax","type","url","dataType","success","remove"],"mappings":"44BAAA,IAGaA,4GAA+BC,CAC3C,SAAAD,EAAYE,GAAS,IAAAC,EAAAC,kGAAAC,CAAAD,KAAAJ,GACpBI,KAAKF,QAAUA,EACfE,KAAKE,SAAWC,EAAEL,GAClB,IAAIM,EAAWJ,KAAKE,SAASG,KAAI,IAAAC,OANvB,kCAM+B,WACzCN,KAAKO,GAAKP,KAAKE,SAASM,KAAK,MAC7BR,KAAKS,oBAAsBT,KAAKE,SAASM,KAAK,uBAE9CJ,EAASM,GAAG,QAAS,WACpBX,EAAKG,SAASS,QAAQ,IAAK,WAC1BR,EAAES,MACDC,KAAM,OACNC,IAAG,GAAAR,OAAKP,EAAKU,oBAAmB,KAAAH,OAAIP,EAAKQ,IACzCQ,SAAU,OACVC,QAAS,WACRjB,EAAKG,SAASe","file":"widget-2.2f662a3aa586e55a56ca.js","sourcesContent":["const NS = 'DashboardNotificationItemWidget';\nconst CLS = 'dashboardNotificationItemWidget';\n\nexport class DashboardNotificationItemWidget {\n\tconstructor(element) {\n\t\tthis.element = element;\n\t\tthis.$element = $(element);\n\t\tlet closeBtn = this.$element.find(`.${CLS}-close`);\n\t\tthis.id = this.$element.data('id');\n\t\tthis.notificationReadApi = this.$element.data('notificationReadApi');\n\n\t\tcloseBtn.on('click', () => {\n\t\t\tthis.$element.fadeOut(400, () => {\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: `${this.notificationReadApi}/${this.id}`,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: () => {\n\t\t\t\t\t\tthis.$element.remove();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n}\n"],"sourceRoot":""}