import{j as u,aI as d,I as h,T as n,cl as p,aO as m,aP as j,aQ as f,aR as C,aS as A}from"./mui-vendor-CkIVaoQP.js";import{u as g,j as o,r as y}from"./react-vendor-CmFgShSM.js";import{f as T,u as D}from"./redux-vendor-B7uoacJt.js";import{L as S,iA as I,h as E,G as e,S as i,p as b,q as F}from"./index-Vwb3Bce5.js";import{d as G}from"./NavigateNext-Cq2TNCPy.js";import{S as L}from"./SimpleTable-B3_6HY_p.js";import"./index-CgNdnt2v.js";import"./Close-8pFLGZ5w.js";import"./Search-CLlOaERQ.js";import"./Delete-DHYHiC8G.js";const J=()=>{const{avicultureHallInspects:t}=T(s=>s.avicultureSlice),r=D(),l=g(),{key:c}=o(),{hall:x}=o();return y.useEffect(()=>{r(S()),r(I(c+"&hall="+x)).then(()=>{r(E())})},[]),u.jsx(d,{display:"flex",justifyContent:"center",children:u.jsx(e,{container:!0,direction:"column",justifyContent:"center",xs:12,sm:12,md:10,lg:10,children:u.jsx(e,{container:!0,justifyContent:"space-between",gap:i.SMALL,children:u.jsx(e,{xs:12,children:u.jsxs(e,{mt:i.MEDIUM,children:[u.jsx(e,{container:!0,alignItems:"center",children:u.jsxs(h,{"aria-label":"delete",color:"primary",onClick:()=>l(-1),children:[u.jsx(G,{}),u.jsx(n,{children:"بازگشت"})]})}),u.jsxs(p,{sx:{gap:i.MEDIUM},children:[t==null?void 0:t.map(s=>u.jsxs(m,{sx:{alignSelf:"flex-start",width:"100%"},children:[u.jsxs(j,{children:[u.jsx(f,{}),u.jsx(C,{})]}),u.jsxs(e,{container:!0,direction:"column",flexWrap:"nowrap",flex:"1",children:[u.jsx(e,{container:!0,children:u.jsx(e,{children:u.jsx(A,{children:u.jsxs(n,{variant:"body1",fontWeight:"bold",children:["بازرسی مورخ ",b(s.createDate)," ","ساعت ",F(s.createDate)]})})})}),u.jsx(e,{container:!0,xs:12,children:u.jsx(e,{xs:12,children:u.jsx(L,{columns:["موضوع بازرسی","توضیحات","تلفات","تصویر"],data:[[s.topic,s.description,s.Losses,s.image.length?s.image.map(a=>[u.jsx(e,{display:"inline-flex",children:u.jsx("a",{href:a,alt:"دانلود",children:u.jsx("img",{src:a,width:"80",height:"80",alt:"دانلود",style:{marginRight:"10px",borderRadius:"5px"}})})},a)]):"بدون پیوست"]]})})})]})]},s.id)),!(t!=null&&t.length)&&u.jsx(n,{variant:"body1",component:"span",children:"برای این سالن بازرسی ثبت نشده است."})]})]})})})})})};export{J as default};
