var Icons={error:'<div class="toast-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 24px; height: 24px; display: block;">\n  <path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" />\n</svg></div>',success:'<div class="toast-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 24px; height: 24px; display: block;">\n  <path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" />\n</svg></div>',info:'<div class="toast-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 24px; height: 24px; display: block;">\n  <path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" />\n</svg></div>',default:'<div class="toast-icon"></div>'};var Colors={error:"#ed3d3d",success:"#3dc763",info:"#2379c7",default:"#6a56c1"};var removeToasts=function(){return Array.from(document.getElementsByClassName("verdocs-toast")).forEach((function(o){return o.remove()}))};var closeClicked=function(o){o.stopPropagation();removeToasts()};var VerdocsToast=function(o,s){if(s===void 0){s={}}removeToasts();var e=s||{},r=e.duration,t=r===void 0?5e3:r,l=e.style,d=l===void 0?"default":l;var a=Colors[d]||Colors.default;var i=Icons[d]||Icons.default;var c="\n    ".concat(i,'\n    <div class="verdocs-toast-text" style="padding: 12px 12px 12px 0; display: flex; flex: 1">').concat(o,'</div>\n    <div class="verdocs-toast-close" style="padding: 12px 10px; background: rgba(0, 0, 0, 0.2); cursor: pointer;">✕</div>\n  ');var n=document.createElement("div");n.className="verdocs-toast";n.innerHTML=c;n.style.cssText="\ndisplay: flex; flex-direction: row; gap: 10px; align-items: center;\nposition: fixed; top: 20px; right: 20px; z-index: 2147483647; width: 50%; max-width: calc(100% - 40px);\ncolor: #ffffff; background: ".concat(a,"; font-family: 'Barlow', sans-serif;\nborder-radius: 2px; padding-left: 10px;\nbox-shadow: 0 3px 7px 2px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);");document.body.append(n);var v=Array.from(document.getElementsByClassName("verdocs-toast-close"));v.forEach((function(o){return o.addEventListener("click",closeClicked)}));setTimeout(removeToasts,t)};export{VerdocsToast as V};
//# sourceMappingURL=Toast-CyvDgtoV.js.map