import{j as l,I as T,aJ as q}from"./mui-vendor-CkIVaoQP.js";import{r as s,u as g}from"./react-vendor-CmFgShSM.js";import{A as G}from"./AdvancedTable-B0ObjV8k.js";import{d as L}from"./Plagiarism-B6PD3EJO.js";import{u as _,f as w}from"./redux-vendor-B7uoacJt.js";import{L as B,a1 as J,h as O,p as S}from"./index-Vwb3Bce5.js";const k=()=>{const a=_(),{avicultureRequests:o}=w(t=>t.avicultureSlice),[c,r]=s.useState(o);return s.useEffect(()=>{a(B()),a(J()).then(()=>{a(O())})},[]),s.useEffect(()=>{r(o)},[o]),c||[]},K=()=>{const a=g(),[o,c]=s.useState([]),r=k(),t=window.location.pathname.split("/")[1];s.useEffect(()=>{const I="/"+t+"/file/",p=r==null?void 0:r.filter((u,e)=>u.finalState==="archive"),N=p==null?void 0:p.map((u,e)=>{var n,A,d,f,C,y,E,v,F,h,x,D;return[e+1,u.orderCode,S(u==null?void 0:u.createDate),S(u==null?void 0:u.sendDate),(A=(n=u==null?void 0:u.process)==null?void 0:n.poultry)==null?void 0:A.poultryName,(f=(d=u==null?void 0:u.process)==null?void 0:d.poultry)==null?void 0:f.poultryMobile,(y=(C=u==null?void 0:u.process)==null?void 0:C.poultry)==null?void 0:y.poultryCity,(v=(E=u==null?void 0:u.process)==null?void 0:E.poultry)==null?void 0:v.poultryProvince,(h=(F=u==null?void 0:u.process)==null?void 0:F.poultry)==null?void 0:h.age,(D=(x=u==null?void 0:u.process)==null?void 0:x.poultry)==null?void 0:D.poultryQuantity,l.jsx(T,{"aria-label":"delete",color:"primary",onClick:()=>{var b,R;return a(I+((R=(b=u==null?void 0:u.process)==null?void 0:b.poultry)==null?void 0:R.poultryRequestId))},children:l.jsx(L,{})},u==null?void 0:u.orderCode)]});c(N)},[]);const[j]=s.useState(["ردیف","کد سفارش","تاریخ ثبت درخواست","تاریخ درخواست","مرغدار","تلفن مرغدار","شهر","استان","سن مرغ","تعداد","مشاهده"]);return l.jsx(q,{children:l.jsx(G,{expandable:!0,name:"درخواست های پایان یافته",columns:j,data:o})})};export{K as A,k as u};
