import{C as e,O as t,Q as n,S as r,St as i,Y as a,cn as o,dt as s,in as c,j as l,k as u,kt as d,nn as f,tt as p,w as m,x as h,z as g}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import{Zt as _,n as v,x as y,y as b}from"./style-DGCNsUJ6.js";import{S as x,g as S,x as C}from"./GxPagination-DOexUzbO.js";import{H as w,Ot as T,Vt as E,gt as D,kt as O}from"./vnode-DU8g6Rf7.js";import{i as k,t as A}from"./button-CHjzS7b0.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:w,default:()=>D},iconColor:{type:String,default:`#f90`},hideIcon:Boolean,hideAfter:{type:Number,default:200},effect:{...x.effect,default:`light`},teleported:x.teleported,persistent:x.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=O(E(l({...l({name:`ElPopconfirm`}),props:j,emits:M,setup(l,{expose:b,emit:x}){let C=l,{t:w}=y(),E=_(`popconfirm`),D=i(),O=i(),k=h(()=>d(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=h(()=>({width:v(C.width)})),P=e=>{x(`confirm`,e),M()},F=e=>{x(`cancel`,e),M()},I=h(()=>C.confirmButtonText||w(`el.popconfirm.confirmButtonText`)),L=h(()=>C.cancelButtonText||w(`el.popconfirm.cancelButtonText`));return b({popperRef:k,hide:M}),(i,l)=>(a(),e(d(S),g({ref_key:`tooltipRef`,ref:D,trigger:`click`,effect:i.effect},i.$attrs,{"popper-class":`${d(E).namespace.value}-popover`,"popper-style":d(N),teleported:i.teleported,"fallback-placements":[`bottom`,`top`,`right`,`left`],"hide-after":i.hideAfter,persistent:i.persistent,loop:``,onShow:j}),{content:s(()=>[r(`div`,{ref_key:`rootRef`,ref:O,tabindex:`-1`,class:f(d(E).b())},[r(`div`,{class:f(d(E).e(`main`))},[!i.hideIcon&&i.icon?(a(),e(d(T),{key:0,class:f(d(E).e(`icon`)),style:c({color:i.iconColor})},{default:s(()=>[(a(),e(p(i.icon)))]),_:1},8,[`class`,`style`])):m(`v-if`,!0),t(` `+o(i.title),1)],2),r(`div`,{class:f(d(E).e(`action`))},[n(i.$slots,`actions`,{confirm:P,cancel:F},()=>[u(d(A),{size:`small`,type:i.cancelButtonType===`text`?``:i.cancelButtonType,text:i.cancelButtonType===`text`,onClick:F},{default:s(()=>[t(o(d(L)),1)]),_:1},8,[`type`,`text`]),u(d(A),{size:`small`,type:i.confirmButtonType===`text`?``:i.confirmButtonType,text:i.confirmButtonType===`text`,onClick:P},{default:s(()=>[t(o(d(I)),1)]),_:1},8,[`type`,`text`])])],2)],2)]),default:s(()=>[i.$slots.reference?n(i.$slots,`reference`,{key:0}):m(`v-if`,!0)]),_:3},16,[`effect`,`popper-class`,`popper-style`,`teleported`,`hide-after`,`persistent`]))}}),[[`__file`,`popconfirm.vue`]]));export{N as t};