const e=require("../_util/classNames.js"),t=require("../locale/LocaleReceiver.js"),n=require("../_util/transition.js"),r=require("./Modal.js"),i=require("../_util/ActionButton.js");let a=require("vue"),o=require("@antsoo-lib/icons");function s(e){return typeof e==`function`?e():e}var c=(0,a.defineComponent)({name:`ConfirmDialog`,inheritAttrs:!1,props:`icon.onCancel.onOk.close.closable.zIndex.afterClose.visible.open.keyboard.centered.getContainer.maskStyle.okButtonProps.cancelButtonProps.okType.prefixCls.okCancel.width.mask.maskClosable.okText.cancelText.autoFocusButton.transitionName.maskTransitionName.type.title.content.direction.rootPrefixCls.bodyStyle.closeIcon.modalRender.focusTriggerAfterClose.wrapClassName.confirmPrefixCls.footer`.split(`.`),setup(c,{attrs:l}){let[u]=t.useLocaleReceiver(`Modal`);return()=>{let{icon:t,onCancel:d,onOk:f,close:p,okText:m,closable:h=!1,zIndex:g,afterClose:_,keyboard:v,centered:y,getContainer:b,maskStyle:x,okButtonProps:S,cancelButtonProps:C,okCancel:w,width:T=416,mask:E=!0,maskClosable:D=!1,type:O,open:k,title:A,content:j,direction:M,closeIcon:N,modalRender:P,focusTriggerAfterClose:F,rootPrefixCls:I,bodyStyle:L,wrapClassName:R,footer:z}=c,B=t;if(!t&&t!==null)switch(O){case`info`:B=(0,a.createVNode)(o.InfoCircleFilled,null,null);break;case`success`:B=(0,a.createVNode)(o.CheckCircleFilled,null,null);break;case`error`:B=(0,a.createVNode)(o.CloseCircleFilled,null,null);break;default:B=(0,a.createVNode)(o.ExclamationCircleFilled,null,null)}let V=c.okType||`primary`,H=c.prefixCls||`ant-modal`,U=`${H}-confirm`,W=l.style||{},G=w??O===`confirm`,K=c.autoFocusButton===null?!1:c.autoFocusButton||`ok`,q=`${H}-confirm`,J=e.default(q,`${q}-${c.type}`,{[`${q}-rtl`]:M===`rtl`},l.class),Y=u.value,X=G&&(0,a.createVNode)(i.default,{actionFn:d,close:p,autofocus:K===`cancel`,buttonProps:C,prefixCls:`${I}-btn`},{default:()=>[s(c.cancelText)||Y.cancelText]});return(0,a.createVNode)(r.default,{prefixCls:H,class:J,wrapClassName:e.default({[`${q}-centered`]:!!y},R),onCancel:e=>p?.({triggerCancel:!0},e),open:k,title:``,footer:``,transitionName:n.getTransitionName(I,`zoom`,c.transitionName),maskTransitionName:n.getTransitionName(I,`fade`,c.maskTransitionName),mask:E,maskClosable:D,maskStyle:x,style:W,bodyStyle:L,width:T,zIndex:g,afterClose:_,keyboard:v,centered:y,getContainer:b,closable:h,closeIcon:N,modalRender:P,focusTriggerAfterClose:F},{default:()=>[(0,a.createVNode)(`div`,{class:`${U}-body-wrapper`},[(0,a.createVNode)(`div`,{class:`${U}-body`},[s(B),A===void 0?null:(0,a.createVNode)(`span`,{class:`${U}-title`},[s(A)]),(0,a.createVNode)(`div`,{class:`${U}-content`},[s(j)])]),z===void 0?(0,a.createVNode)(`div`,{class:`${U}-btns`},[X,(0,a.createVNode)(i.default,{type:V,actionFn:f,close:p,autofocus:K===`ok`,buttonProps:S,prefixCls:`${I}-btn`},{default:()=>[s(m)||(G?Y.okText:Y.justOkText)]})]):s(z)])]})}}});exports.default=c;