import{d as l,n as r,c,a as e,t as o,e as m,T as g,o as i}from"./index-BaNRFt4f.js";const f={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4"},x={class:"relative bg-white rounded-lg shadow-lg w-full max-w-sm p-5"},b={class:"text-base font-semibold text-gray-900"},u={class:"mt-2 text-sm text-gray-600"},y={class:"mt-4 flex justify-end gap-2"},p=["disabled"],C=l({__name:"ConfirmModal",props:{open:{type:Boolean},title:{},message:{},loading:{type:Boolean}},emits:["confirm","cancel"],setup(s,{emit:d}){const n=d;return(v,t)=>(i(),r(g,{to:"body"},[s.open?(i(),c("div",f,[e("div",{class:"fixed inset-0 bg-black/40",onClick:t[0]||(t[0]=a=>n("cancel"))}),e("div",x,[e("h3",b,o(s.title||"Confirmar"),1),e("p",u,o(s.message||"¿Estás seguro de realizar esta acción?"),1),e("div",y,[e("button",{onClick:t[1]||(t[1]=a=>n("cancel")),class:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-md transition"}," Cancelar "),e("button",{onClick:t[2]||(t[2]=a=>n("confirm")),disabled:s.loading,class:"px-3 py-1.5 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-md transition disabled:opacity-50"},o(s.loading?"Eliminando...":"Eliminar"),9,p)])])])):m("",!0)]))}});export{C as _};
