{"version":3,"sources":["webpack://wweebpack/./src/js/classes/bToastClass.ts"],"names":["bToastConfig","toastContainer","toastInner","document","getElementById","returnReason","dataset","reason","success","trim","toastBootstrap","includes","classList","remove","add","show"],"mappings":";iNACA,MAAMA,GAENA,EAAaC,eAAiB,mBAC9BD,EAAaE,WAAa,eAiB1B,UAhBA,MACI,cACI,IAAID,EAAiBE,SAASC,eAAeJ,EAAaC,gBACtDC,EAAaC,SAASC,eAAeJ,EAAaE,YAClDG,EAAeJ,EAAeK,QAAQC,OACtCC,EAAUP,EAAeK,QAAQE,QACrC,GAA4B,IAAxBH,GAAcI,OAAc,CAC5B,MAAMC,EAAiB,wBAA0BR,GAC7CM,GAASG,SAAS,WAClBV,EAAeW,UAAUC,OAAO,mBAChCZ,EAAeW,UAAUE,IAAI,mBAEjCJ,EAAeK","file":"toast.js","sourcesContent":["import Toast from \"bootstrap/js/dist/toast\";\r\nclass bToastConfig {\r\n}\r\nbToastConfig.toastContainer = 'toast__container';\r\nbToastConfig.toastInner = 'toast__inner';\r\nclass bToast {\r\n constructor() {\r\n var toastContainer = document.getElementById(bToastConfig.toastContainer);\r\n var toastInner = document.getElementById(bToastConfig.toastInner);\r\n var returnReason = toastContainer.dataset.reason;\r\n var success = toastContainer.dataset.success;\r\n if (returnReason?.trim() != '') {\r\n const toastBootstrap = Toast.getOrCreateInstance(toastInner);\r\n if (success?.includes(\"false\")) {\r\n toastContainer.classList.remove(\"text-bg-primary\");\r\n toastContainer.classList.add(\"text-bg-danger\");\r\n }\r\n toastBootstrap.show();\r\n }\r\n }\r\n}\r\nexport default bToast;\r\n"],"sourceRoot":""}