import{o as n,c as d,a as e,r as g,i as v,g as a,f as o,u as s,k as b,t as l,h as p}from"./app-a39c937f.js";import{h as y,G as _,V as k,U as C,S as V}from"./transition-37a067aa.js";function B(i,c){return n(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})])}const j={class:"fixed inset-0 z-10 w-screen overflow-y-auto"},A={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},M={class:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4"},S={class:"sm:flex sm:items-start"},z={class:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"},N={class:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left"},$={class:"mt-2"},L={class:"text-sm text-gray-500"},T={class:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6"},Z={key:1,type:"button",class:"inline-flex w-full justify-center rounded-md bg-gray-400 px-3 py-2 text-sm font-semibold text-white sm:ml-3 sm:w-auto"},U={__name:"AlertModal",props:{modelValue:Boolean,label:String,description:String},emits:["update:modelValue","confirm"],setup(i,{emit:c}){const u=i,r=g(!1),f=c;function h(){r.value=!0,setTimeout(()=>{f("confirm"),r.value=!1},1e3)}function x(){f("update:modelValue",!1)}return(m,t)=>(n(),v(s(V),{as:"template",show:i.modelValue},{default:a(()=>[o(s(C),{as:"div",class:"relative z-10",onClose:t[1]||(t[1]=w=>m.open=!1)},{default:a(()=>[o(s(y),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:a(()=>t[2]||(t[2]=[e("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"},null,-1)])),_:1}),e("div",j,[e("div",A,[o(s(y),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:a(()=>[o(s(_),{class:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"},{default:a(()=>[e("div",M,[e("div",S,[e("div",z,[o(s(B),{class:"h-6 w-6 text-red-600","aria-hidden":"true"})]),e("div",N,[o(s(k),{as:"h3",class:"text-base font-semibold leading-6 text-gray-900"},{default:a(()=>[b(l(u.label),1)]),_:1}),e("div",$,[e("p",L,l(u.description),1)])])])]),e("div",T,[r.value?(n(),d("button",Z,t[3]||(t[3]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),e("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[e("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})])],-1)]))):(n(),d("button",{key:0,type:"button",class:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto",onClick:t[0]||(t[0]=p(w=>h(),["stop"]))},l(m.$t("Delete")),1)),e("button",{type:"button",class:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:p(x,["self"]),ref:"cancelButtonRef"},l(m.$t("Cancel")),513)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"]))}};export{U as _};
