import{_ as n}from"./DzTg5x6T.js";const w=()=>({showSuccess:async(r,e="Succès")=>{if(!(typeof window>"u"))try{const{default:t}=await n(async()=>{const{default:o}=await import("./B0QE1GKd.js");return{default:o}},[],import.meta.url);return console.log("🔔 SweetAlert2 chargé, affichage succès:",r),await t.fire({icon:"success",title:e,html:r.replace(/\n/g,"<br>"),confirmButtonColor:"#1364CD",confirmButtonText:"OK"})}catch(t){console.error("❌ Erreur SweetAlert2:",t),alert(r)}},showError:async(r,e="Erreur")=>{if(!(typeof window>"u"))try{const{default:t}=await n(async()=>{const{default:o}=await import("./B0QE1GKd.js");return{default:o}},[],import.meta.url);return console.log("🔔 SweetAlert2 chargé, affichage erreur:",r),await t.fire({icon:"error",title:e,html:r.replace(/\n/g,"<br>"),confirmButtonColor:"#CD1364",confirmButtonText:"OK"})}catch(t){console.error("❌ Erreur SweetAlert2:",t),alert(r)}},showWarning:async(r,e="Attention")=>{if(!(typeof window>"u"))try{const{default:t}=await n(async()=>{const{default:o}=await import("./B0QE1GKd.js");return{default:o}},[],import.meta.url);return await t.fire({icon:"warning",title:e,text:r,confirmButtonColor:"#1364CD",confirmButtonText:"OK"})}catch(t){console.error("❌ Erreur SweetAlert2:",t),alert(r)}},showInfo:async(r,e="Information")=>{if(!(typeof window>"u"))try{const{default:t}=await n(async()=>{const{default:o}=await import("./B0QE1GKd.js");return{default:o}},[],import.meta.url);return await t.fire({icon:"info",title:e,html:r.replace(/\n/g,"<br>"),confirmButtonColor:"#1364CD",confirmButtonText:"OK"})}catch(t){console.error("❌ Erreur SweetAlert2:",t),alert(r)}},showConfirm:async(r,e="Confirmation")=>{if(typeof window>"u")return{isConfirmed:!1};try{const{default:t}=await n(async()=>{const{default:o}=await import("./B0QE1GKd.js");return{default:o}},[],import.meta.url);return await t.fire({icon:"question",title:e,text:r,showCancelButton:!0,confirmButtonColor:"#1364CD",cancelButtonColor:"#CD1364",confirmButtonText:"Oui",cancelButtonText:"Non"})}catch(t){return console.error("❌ Erreur SweetAlert2:",t),{isConfirmed:confirm(r)}}}});export{w as u};
