Your IP : 216.73.216.93


Current Path : /home/users/unlimited/www/web.medimeet.codeskitter.site/assets/
Upload File :
Current File : /home/users/unlimited/www/web.medimeet.codeskitter.site/assets/Files-Ds6F8Vo3.js

import{r as x,d as f,j as e,O as p,E as j,B as n,T as r,a8 as y,a9 as l,P as g,Q as b,F as d,ak as S,Y as v,aX as F,i as _,f as w,a7 as C}from"./index-CDlA-3aM.js";import{G as E}from"./index-kV9pP1gE.js";import{u as z}from"./UseDebounce-D_5sbxMP.js";import{I as B}from"./input-element-Bbt7yrud.js";import{S as I}from"./Search-DD7xJH3Y.js";import{C as k,a as D}from"./card-body-t9yk5qgp.js";function L(s){const t=`${_}/${s}`;window.open(t,"_blank")}function P(){const[s,t]=x.useState(""),c=z(s,1e3),u=async()=>(await w(`get_patient_file_q/user?user_id=${C.id}&search_query=${c}`)).data,{data:i,isLoading:m,error:h}=f({queryKey:["files",c],queryFn:u});return m?e.jsx(p,{}):h?e.jsx(j,{}):e.jsxs(n,{minH:"50vh",children:[e.jsx(n,{bg:"primary.main",p:4,py:{base:"4",md:"10"},children:e.jsx(n,{className:"container",children:e.jsx(r,{fontSize:{base:18,md:32},fontWeight:700,textAlign:"center",mt:0,color:"#fff",children:"Files"})})}),e.jsx(n,{className:"container",maxW:600,children:e.jsx(n,{w:"full",rounded:"lg",mt:5,borderRadius:8,overflow:"hidden",p:2,children:e.jsx(y,{children:e.jsxs(l.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:.2},children:[e.jsx(n,{w:"100%",mx:"auto",mb:5,children:e.jsxs(g,{children:[e.jsx(B,{pointerEvents:"none",children:e.jsx(I,{color:"gray.300"})}),e.jsx(b,{placeholder:"Search Files...",value:s,onChange:a=>{let o=a.target.value;t(o)},variant:"outline",focusBorderColor:"blue.400",bg:"#fff"})]})}),i&&(i.length?e.jsx(n,{mt:5,children:i.map(a=>e.jsx(l.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:.7},children:e.jsx(k,{cursor:"pointer",mb:4,onClick:()=>{},children:e.jsx(D,{p:4,children:e.jsxs(d,{align:"center",justify:"space-between",children:[e.jsxs(d,{align:"center",gap:4,children:[" ",e.jsx(E,{fontSize:24,color:"#2D3748"}),e.jsxs(n,{children:[e.jsx(r,{fontSize:14,fontWeight:600,mb:0,children:a.file_name}),e.jsxs(r,{fontSize:12,fontWeight:600,children:[a.f_name," ",a.l_name," |"," ",S(a.created_at).format("D-MMM-YY HH:MM A")]})]})]}),e.jsx(v,{icon:e.jsx(F,{}),colorScheme:"blue",size:"sm",onClick:o=>{o.stopPropagation(),L(a.file)}})]})})})},a.id))}):e.jsx(r,{fontSize:14,fontWeight:600,mb:0,textAlign:"center",children:"The files are currently unavailable. You will be able to access them once the doctor uploads the necessary documents"}))]})})})})]})}export{P as default};