import{j as s,c as C,S as n,p as u,M as x}from"./vendor-mui-CBBEb17G.js";import{B as N}from"./index-BkhbTDKf.js";import{a as l,u as S}from"./vendor-react-BBazpZul.js";import{cp as f,v as A,x as v,gh as y,c as R,e as k,R as h,I as j,gi as E}from"./index-IP_FWtso.js";import"./vendor-utils-BveVE6Uf.js";import"./vendor-charts-tGnAgELZ.js";const F=({onClose:c})=>{const{CheckEligibleAsync:t}=f(),[i,r]=l.useState(0),[d,p]=l.useState(null),m=()=>{r(100)},e=()=>{r(0),c()},g=async()=>{try{const{data:o}=await t("1940570042");if(Array.isArray(o)){const a=o.find(b=>b);if(a&&y(a)){r(0);return}}p((o==null?void 0:o.find(a=>a))??null),r(a=>a-1)}catch{r(0)}};return l.useEffect(()=>{i<=0||g()},[i]),s.jsxs(A,{onClose:c,title:"تست کپچا",children:[s.jsx(C,{className:"m-1 !p-2",children:s.jsxs(n,{spacing:2,children:[s.jsx(u,{className:"flex justify-center items-center p-4 text-lg text-red-600",children:i}),s.jsx(u,{className:"h-[300px] overflow-auto p-2 border rounded-lg",children:JSON.stringify(d)})]})}),s.jsx(v,{onSubmit:m,onClose:e,submitlabel:"شروع"})]})},w=({children:c,className:t})=>s.jsx(u,{className:R("w-full p-4 rounded-md bg-blue-200 shadow-xl !cursor-pointer",t),children:c}),D=()=>{const{serverDate:c}=k(e=>e.doctorData);f();const t=S(),[i,r]=l.useState(!1),[d,p]=l.useState(!1),m=[{id:1,label:"لیست پذیرش",icons:s.jsx(j.List,{color:"primary"}),onClick:()=>t(`/${h.doctors.armedForceAppointmentsList}`)},{id:2,label:"تاریخچه تجویز",icons:s.jsx(j.History,{color:"primary"}),onClick:()=>t(`/${h.doctors.armedForcePrescribeHistory}`)}];return s.jsxs(n,{spacing:2,className:"!h-[calc(100vh-30px)] bg-slate-50 ",children:[s.jsx(n,{className:"p-2 pb-4 px-8 bg-blue-400 ",children:s.jsx("h1",{className:"text-lg text-slate-50",children:"بیمه نیرو های مسلح"})}),s.jsx(n,{p:1,children:s.jsx(x,{container:!0,spacing:2,children:m.map(e=>s.jsx(x,{item:!0,xs:12,sm:6,md:3,lg:2,children:s.jsx(w,{children:s.jsxs("div",{className:"flex flex-row gap-2",onClick:()=>e.onClick(),children:[e.icons,s.jsx("span",{className:"text-slate-700 ",children:e.label})]})})},e.id))})}),d&&s.jsx(F,{onClose:()=>p(!1)})]})},H=()=>s.jsxs(n,{className:"h-[95vh] p-2",children:[s.jsx(N,{prevRoutes:[{path:"/",title:"داشبورد"}],currentRoute:"بیمه نیروهای مسلح"}),s.jsx(E,{children:s.jsx(D,{})})]});export{H as default};
