import{$ as e,A as t,B as n,C as r,M as i,S as a,St as o,T as s,X as c,cn as l,dt as u,in as d,k as f,kt as p,nn as m,nt as h,w as g}from"./_plugin-vue_export-helper-C0lsYS1a.js";import{Qt as _,n as v,x as y,y as b}from"./style-Bvb0L3Ww.js";import{D as x,Jt as S,M as C,N as w,cn as T,ln as E,xn as D,xt as O}from"./GxPagination-DaT0MOF0.js";import{i as k,t as A}from"./button-CTBy3KbX.js";var j=b({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:k,default:`primary`},cancelButtonType:{type:String,values:k,default:`text`},icon:{type:O,default:()=>S},iconColor:{type:String,default:`#f90`},hideIcon:Boolean,hideAfter:{type:Number,default:200},effect:{...w.effect,default:`light`},teleported:w.teleported,persistent:w.persistent,width:{type:[String,Number],default:150},virtualTriggering:C.virtualTriggering,virtualRef:C.virtualRef}),M={confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},N=E(D(i({...i({name:`ElPopconfirm`}),props:j,emits:M,setup(i,{expose:b,emit:S}){let C=i,{t:w}=y(),E=_(`popconfirm`),D=o(),O=o(),k=a(()=>p(D)?.popperRef),j=()=>{var e,t;(t=(e=O.value)?.focus)==null||t.call(e)},M=()=>{var e,t;(t=(e=D.value)?.onClose)==null||t.call(e)},N=a(()=>({width:v(C.width)})),P=e=>{S(`confirm`,e),M()},F=e=>{S(`cancel`,e),M()},I=a(()=>C.confirmButtonText||w(`el.popconfirm.confirmButtonText`)),L=a(()=>C.cancelButtonText||w(`el.popconfirm.cancelButtonText`));return b({popperRef:k,hide:M}),(i,a)=>(c(),g(p(x),n({ref_key:`tooltipRef`,ref:D,trigger:`click`,effect:i.effect},i.$attrs,{"popper-class":`${p(E).namespace.value}-popover`,"popper-style":p(N),teleported:i.teleported,"fallback-placements":[`bottom`,`top`,`right`,`left`],"hide-after":i.hideAfter,persistent:i.persistent,loop:``,onShow:j}),{content:u(()=>[r(`div`,{ref_key:`rootRef`,ref:O,tabindex:`-1`,class:m(p(E).b())},[r(`div`,{class:m(p(E).e(`main`))},[!i.hideIcon&&i.icon?(c(),g(p(T),{key:0,class:m(p(E).e(`icon`)),style:d({color:i.iconColor})},{default:u(()=>[(c(),g(h(i.icon)))]),_:1},8,[`class`,`style`])):s(`v-if`,!0),f(` `+l(i.title),1)],2),r(`div`,{class:m(p(E).e(`action`))},[e(i.$slots,`actions`,{confirm:P,cancel:F},()=>[t(p(A),{size:`small`,type:i.cancelButtonType===`text`?``:i.cancelButtonType,text:i.cancelButtonType===`text`,onClick:F},{default:u(()=>[f(l(p(L)),1)]),_:1},8,[`type`,`text`]),t(p(A),{size:`small`,type:i.confirmButtonType===`text`?``:i.confirmButtonType,text:i.confirmButtonType===`text`,onClick:P},{default:u(()=>[f(l(p(I)),1)]),_:1},8,[`type`,`text`])])],2)],2)]),default:u(()=>[i.$slots.reference?e(i.$slots,`reference`,{key:0}):s(`v-if`,!0)]),_:3},16,[`effect`,`popper-class`,`popper-style`,`teleported`,`hide-after`,`persistent`]))}}),[[`__file`,`popconfirm.vue`]]));export{N as t};