import{j as e,_ as h,S as i,T as n,B as l,t as x}from"./index-76d4793e.js";import{S as p}from"./Buttons-3dd523a8.js";import{C as m}from"./CardContent-2f10f9e9.js";import{C as u}from"./Chip-456ce28e.js";import{L as j}from"./LocationOnOutlined-861cd0c1.js";import{u as d}from"./index-ecea5cfc.js";const f=d.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"),b=({data:s,onViewDetails:c,key:v,onCardSelect:t})=>{var r,o;return e.jsxs(h,{sx:{width:"100%",borderRadius:2,position:"relative"},children:[e.jsxs(m,{onClick:()=>{t&&t()},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:e.jsx("div",{style:{display:"flex",alignItems:"center"},children:e.jsx(i,{spacing:1,children:e.jsx(n,{variant:"h6",fontWeight:600,children:s==null?void 0:s.code})})})}),e.jsx(l,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},gap:1,mt:1,justifyContent:"space-between"},children:e.jsx(u,{sx:{borderRadius:"5px",width:"100%"},color:"default",label:s!=null&&s.due_date?x(s==null?void 0:s.due_date,"YYYY-MM-DD").format("DD-MM-YYYY"):"",variant:"filled"})}),e.jsxs(i,{spacing:2,mt:2,justifyContent:"space-between",children:[e.jsxs(i,{direction:"row",alignItems:"center",spacing:1,children:[e.jsx(j,{fontSize:"small",sx:{fontSize:"14px"}}),e.jsx(n,{variant:"body1",children:(r=s==null?void 0:s.location)==null?void 0:r.name})]}),e.jsxs(i,{direction:"row",alignItems:"center",spacing:1,children:[e.jsx(f,{fontSize:"small",sx:{fontSize:"14px"}}),e.jsx(n,{variant:"body1",children:(o=s==null?void 0:s.department)==null?void 0:o.name})]})]}),e.jsx("div",{style:{marginTop:12},children:e.jsx(p,{authorized_status:s.authorized_status||"",authorized_status_name:s.authorized_status_name||""})})]}),e.jsx(l,{sx:{position:"absolute",top:0,right:10},children:c()})]})};export{b as S};
