import{j as t}from"./vendor-react-wBh_31cN.js";import{C as m}from"./confirmation-dialog-DFt7ZgUQ.js";import{f as i}from"./formatDistance-qDinyJzC.js";const p=({isOpen:e,onClose:o,configName:n,onConfirm:a,isDeleting:r})=>t.jsx(m,{open:e,onOpenChange:s=>{s||o()},title:"Delete monitoring configuration",description:t.jsxs(t.Fragment,{children:["This permanently removes ",t.jsx("code",{className:"font-mono",children:n})," ","and stops collecting monitoring data. This action cannot be undone."]}),confirmLabel:"Delete",confirmVariant:"destructive",isLoading:r,requireTypedConfirm:!0,onConfirm:a}),g=e=>e?`${i(new Date(e),new Date,{addSuffix:!1})} ago`:void 0,l=e=>{if(!e)return;const o=new Date(e),n=new Date;return o>n?`in ${i(o,n)}`:`${i(o,n)} ago`};export{p as D,g as a,l as f};
