import{j as e,b as p}from"./mui-vendor-CkIVaoQP.js";import{l6 as f,p as n,G as s,S as i}from"./index-Vwb3Bce5.js";import{r as t}from"./react-vendor-CmFgShSM.js";import{u as A,f as x}from"./redux-vendor-B7uoacJt.js";import{A as j}from"./AdvancedTable-B0ObjV8k.js";import"./index-CgNdnt2v.js";import"./Close-8pFLGZ5w.js";import"./Search-CLlOaERQ.js";import"./Delete-DHYHiC8G.js";const F=()=>{const l=A(),{jahadIllegalKilling:r}=x(a=>a.jahadSlice),[C,c]=t.useState([]);return t.useEffect(()=>{l(f())},[]),t.useEffect(()=>{const a=r==null?void 0:r.map((u,d)=>{const o=u.quantity-u.losses-u.leftOver;return[d+1,u.poultry.unitName,u.poultry.userprofile.baseOrder,u.poultry.userprofile.mobile,u.hall,u.period,n(u==null?void 0:u.createDate),n(u==null?void 0:u.date),u.chickenBreed,u.age,u.quantity,`${u.losses} (%${(u.losses*100/u.quantity).toFixed(0)})`,o+` (%${(o*100/u.quantity).toFixed(0)})`,`${u.leftOver} (%${(u.leftOver*100/u.quantity).toFixed(0)})`,u.message]});c(a)},[r]),e.jsx(s,{container:!0,children:e.jsx(j,{name:"کشتارهای غیرمجاز",columns:["ردیف","نام فارم","کدکاربری","تلفن","سالن","دوره جوجه ریزی","تاریخ ثبت جوجه ریزی","تاریخ جوجه ریزی","نژاد","سن","تعداد جوجه ریزی","تلفات دوره","کشتار شده","مانده در سالن","توضیحات"],data:C})})},$=()=>e.jsx(e.Fragment,{children:e.jsx(p,{display:"flex",justifyContent:"center",children:e.jsx(s,{container:!0,direction:"column",justifyContent:"center",xs:12,sm:12,md:10,lg:10,children:e.jsx(s,{container:!0,justifyContent:"space-between",gap:i.SMALL,children:e.jsx(s,{xs:12,children:e.jsx(F,{})})})})})});export{$ as default};
