import{o as e}from"./chunk-jRWAZmH_.js";import{n as t,t as n}from"./jsx-runtime-CEixWuwE.js";import{n as r}from"./axios-v6FV69Ne.js";import{t as i}from"./button-C7b7AmGo.js";import{t as a}from"./popconfirm-CrjlZKtV.js";import{t as o}from"./UndoOutlined-2WspCEN7.js";import{F as s}from"./index-BqyXv5bE.js";var c=e(t()),l=e(r()),u=n(),d=({onConfirm:e,modified:t=!0,children:n,title:r=`Quitter sans enregistrer ?`,description:l=`Vos modifications seront perdues.`,okText:d=`Quitter`,cancelText:f=`Continuer à modifier`,placement:p=`topRight`,toolTipTitle:m=`Annuler les modifications`,text:h,size:g=`default`,disabled:_=!1})=>{let v=(0,u.jsx)(s,{title:h?null:m,children:(0,u.jsx)(i,{size:g,disabled:_,icon:(0,u.jsx)(o,{}),children:h})});return t?(0,u.jsx)(a,{placement:p,title:r,description:l,onConfirm:e,okText:d,okButtonProps:{danger:!0},cancelText:f,children:n??v}):n?c.cloneElement(n,{onClick:e}):c.cloneElement(v,{onClick:e})};d.propTypes={onConfirm:l.default.func.isRequired,modified:l.default.bool,children:l.default.node,title:l.default.string,description:l.default.string,okText:l.default.string,cancelText:l.default.string,placement:l.default.string,toolTipTitle:l.default.string,text:l.default.string,size:l.default.string,disabled:l.default.bool};export{d as t};