import{j as e,c as d,f}from"./vendor-mui-CBBEb17G.js";import{a as u}from"./vendor-react-BBazpZul.js";import{at as j,v as p,dP as g,aP as h,ao as r,bx as y,er as D,c3 as w}from"./index-DdWwwZXu.js";const v=({data:s,onClose:a})=>{var n;const{DeletePatientReminder:l}=w(),o=j(),[c,i]=u.useState(!1),m=async()=>{try{i(!1),o({content:"آیا از حذف یادآوری اطمینان دارید؟"}).then(async()=>{for(let t=0;t<s.length;t++){const x=s[t];await l(x.id)}a()}).catch(()=>{})}finally{i(!1)}};return e.jsxs(p,{title:`نمایش یادآوری (${(n=s[0])==null?void 0:n.patientFullName})`,onClose:a,maxWidth:"xs",children:[e.jsxs(d,{className:"m-1 !p-2 relative",children:[c&&e.jsx(g,{}),e.jsx(h,{multiline:!0,rows:3,value:s.map(t=>t.text).join(`\r
`),"aria-readonly":!0})]}),e.jsxs(f,{className:"!flex !justify-center !items-center gap-1 !w-full mt-1",children:[e.jsx(r,{color:"error",startIcon:e.jsx(y,{}),className:"!w-[120px]",onClick:m,children:"حذف"}),e.jsx(r,{color:"primary",startIcon:e.jsx(D,{}),className:"!w-[120px]",onClick:a,children:"بستن"})]})]})};export{v as R};
