import{r as e}from"./rolldown-runtime-B0Z9INg1.js";import{B as t,Bt as n,Dt as r,G as i,L as a,N as o,P as s,R as c,Tt as l,Ut as u,bt as d,it as f,lt as p,nt as m,ot as h,qt as g}from"./vue-3bs2-dMU.js";import{K as _,U as v}from"./stores-DmetsdTd.js";import{C as y,D as b,K as x,S,T as C,ht as w,w as T}from"./vuetify-gGrfRH2I.js";i(),l(),u();var E=t({__name:`ConfirmDialog`,props:{guid:{},title:{},text:{},noColor:{},noText:{},yesColor:{},yesText:{}},emits:[`confirm`,`cancel`],setup(e,{emit:t}){let i=e,l=t,{t:u}=_(),{isOpened:E}=v(i.guid);function D(){E.value=!1}function O(){D(),l(`cancel`)}function k(){D(),l(`confirm`)}function A(e){e.key===`Enter`?(e.preventDefault(),k()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),O())}return m(()=>{document.addEventListener(`keydown`,A)}),f(()=>{document.removeEventListener(`keydown`,A)}),(t,i)=>(h(),o(S,{modelValue:n(E),"onUpdate:modelValue":i[0]||=e=>r(E)?E.value=e:null,width:`auto`,"max-width":`1000`},{default:d(()=>[c(y,null,{default:d(()=>[c(C,null,{default:d(()=>[a(g(e.title),1)]),_:1}),t.$slots.default?(h(),o(T,{key:0},{default:d(()=>[p(t.$slots,`default`)]),_:3})):e.text?(h(),o(T,{key:1,class:`text-pre`},{default:d(()=>[a(g(e.text),1)]),_:1})):s(``,!0),c(b,null,{default:d(()=>[c(w),c(x,{color:e.noColor,onClick:O},{default:d(()=>[a(g(e.noText??n(u)(`common.no`)),1)]),_:1},8,[`color`]),c(x,{color:e.yesColor,onClick:k},{default:d(()=>[a(g(e.yesText??n(u)(`common.yes`)),1)]),_:1},8,[`color`])]),_:1})]),_:3})]),_:3},8,[`modelValue`]))}}),D=e({default:()=>O}),O=E;export{D as n,O as t};