import{j as e,E as c,_ as p,B as t,T as o,S as n,t as m}from"./index-60a3c753.js";import{S as h}from"./Buttons-0f6898d9.js";import{C as f}from"./CardContent-faee3650.js";import{C as b}from"./Chip-cc311899.js";import{L as g}from"./LocationOnOutlined-dffc9f14.js";import{u}from"./index-900fa817.js";const j=u.createSvgIcon(e.jsx("path",{d:"M20 7h-4V5l-2-2h-4L8 5v2H4c-1.1 0-2 .9-2 2v5c0 .75.4 1.38 1 1.73V19c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2v-3.28c.59-.35 1-.99 1-1.72V9c0-1.1-.9-2-2-2M10 5h4v2h-4zM4 9h16v5h-5v-3H9v3H4zm9 6h-2v-2h2zm6 4H5v-3h4v1h6v-1h4z"}),"BusinessCenterOutlined"),Y=({data:s,onViewDetails:l,key:v,onCardSelect:a})=>{var x,d;const i=c(),r=i.palette.mode==="dark";return e.jsxs(p,{sx:{width:"100%",borderRadius:3,position:"relative",background:r?i.palette.background.paper:"rgba(255, 255, 255, 0.95)",backdropFilter:"blur(10px)",border:r?`1px solid ${i.palette.divider}`:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:r?"0 8px 32px rgba(0, 0, 0, 0.3)":"0 8px 32px rgba(0, 0, 0, 0.12)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer","&:hover":{transform:"translateY(-4px)",boxShadow:r?"0 12px 40px rgba(0, 0, 0, 0.4)":"0 12px 40px rgba(0, 0, 0, 0.15)"},"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"3px",background:"linear-gradient(90deg, #3b82f6, #8b5cf6)",borderRadius:"12px 12px 0 0"}},children:[e.jsxs(f,{sx:{padding:"24px !important","&:last-child":{paddingBottom:"24px !important"}},onClick:()=>{a&&a()},children:[e.jsx(t,{sx:{mb:2},children:e.jsx(o,{variant:"h5",sx:{fontWeight:700,color:i.palette.text.primary,mb:1,fontSize:{xs:"1rem",sm:"1.25rem"}},children:s==null?void 0:s.code})}),e.jsx(n,{direction:{xs:"column",sm:"row"},spacing:1,sx:{mb:2},children:e.jsx(b,{sx:{borderRadius:"8px",background:r?"linear-gradient(135deg, #1e3a8a, #1e40af)":"linear-gradient(135deg, #eff6ff, #dbeafe)",color:r?"#dbeafe":"#1e40af",border:r?"1px solid #1e40af":"1px solid #bfdbfe",fontWeight:600,fontSize:"0.75rem",width:{xs:"100%",sm:"auto"}},label:s!=null&&s.due_date?m(s==null?void 0:s.due_date,"YYYY-MM-DD").format("DD-MM-YYYY"):"",variant:"outlined"})}),e.jsx(n,{spacing:{xs:1.5,sm:2.5},sx:{mb:2},children:e.jsxs(n,{spacing:{xs:1,sm:1.5},children:[e.jsxs(n,{direction:"row",alignItems:"center",spacing:{xs:1,sm:1.5},children:[e.jsx(t,{sx:{width:{xs:28,sm:32},height:{xs:28,sm:32},borderRadius:"50%",background:r?"linear-gradient(135deg, #1e40af, #3b82f6)":"linear-gradient(135deg, #dbeafe, #93c5fd)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(g,{sx:{fontSize:{xs:14,sm:16},color:r?"#93c5fd":"#1e40af"}})}),e.jsxs(t,{sx:{minWidth:0,flex:1},children:[e.jsx(o,{variant:"caption",sx:{color:i.palette.text.secondary,display:"block",fontSize:{xs:"0.65rem",sm:"0.75rem"}},children:"Location"}),e.jsx(o,{variant:"body2",sx:{fontWeight:600,color:i.palette.text.primary,fontSize:{xs:"0.8rem",sm:"0.875rem"},overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(x=s==null?void 0:s.location)==null?void 0:x.name})]})]}),e.jsxs(n,{direction:"row",alignItems:"center",spacing:{xs:1,sm:1.5},children:[e.jsx(t,{sx:{width:{xs:28,sm:32},height:{xs:28,sm:32},borderRadius:"50%",background:r?"linear-gradient(135deg, #1e3a8a, #1e40af)":"linear-gradient(135deg, #dbeafe, #bfdbfe)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(j,{sx:{fontSize:{xs:14,sm:16},color:r?"#dbeafe":"#1e40af"}})}),e.jsxs(t,{sx:{minWidth:0,flex:1},children:[e.jsx(o,{variant:"caption",sx:{color:i.palette.text.secondary,display:"block",fontSize:{xs:"0.65rem",sm:"0.75rem"}},children:"Department"}),e.jsx(o,{variant:"body2",sx:{fontWeight:600,color:i.palette.text.primary,fontSize:{xs:"0.8rem",sm:"0.875rem"},overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(d=s==null?void 0:s.department)==null?void 0:d.name})]})]})]})}),e.jsx(t,{sx:{mt:"auto"},children:e.jsx(h,{authorized_status:s.authorized_status||"",authorized_status_name:s.authorized_status_name||""})})]}),e.jsx(t,{sx:{position:"absolute",top:16,right:16,zIndex:1},children:l()})]})};export{Y as S};
