import{jasu,IasX,b0asCu,dashu,Basv,bhasdu,alasQ,akasT,a9aspu,Tasy,basgu}from"./mui-vendor-CkIVaoQP.js";import{Gasi,Sasq,hoaseu,hpasru,hqasau,hrastu,Xasd,hsassu,htasnu,huasou,hvascu,Lasb,jasL,has_,Aaslu,OasAu,CasJ,fnasEu,casxu,Masw,basyu,uas_u,Nasiu,_asju,hwasRu,hxasSu,hyasIu,hzasLu}from"./index-Vwb3Bce5.js";import{NasZ}from"./NavLink-D2GD_ItM.js";import{Lasuu}from"./LinkItem-Cp7DiDkz.js";import{masfu}from"./index.esm-CjWvmHks.js";import{aasFu}from"./index.esm-fCjAhNPc.js";import{PasTu}from"./ProvinceBarDifference-BJ7zcdDY.js";import{Basvu}from"./BackButton-CX1bfrW9.js";import{rash,fasbu}from"./react-vendor-CmFgShSM.js";import{aasU,uasB,fasDu}from"./redux-vendor-B7uoacJt.js";import{RasNu}from"./index.esm-Bu7XMDZU.js";import{Rasku}from"./ResponsiveTable-DugzNG82.js";import{dasOu}from"./Tune-DzkdDfJZ.js";import{dasHu}from"./Delete-DHYHiC8G.js";import{basqu}from"./aviculture-get-hatching-data-nSiacZjK.js";import"./iconBase-BEJYyZsk.js";import"./toBase64-DB8tmZmy.js";import"./PublishedWithChanges-BErs-ATv.js";import"./resizeImage-Csf2MO3w.js";import"./Edit-CwJaslma.js";import"./ShowImage-DVQI0Zh5.js";import"./Download-guGqWZIG.js";import"./Close-8pFLGZ5w.js";import"./FilterAlt-CTDmPS36.js";import"./styled-components.browser.esm-gS9mh05b.js";constUu=()=>u.jsxs(i,{container:!0,gap:q.SMALL,p:q.SMALL,direction:{xs:"row",md:"row"},justifyContent:"center",children:[u.jsx(Z,{to:d()==="AdminX"?eu:d()==="SuperAdmin"?ru:d()==="ProvinceOperator"?au:d()==="CityOperator"?tu:"",children:u.jsx(uu,{icon:u.jsx(fu,{size:30,color:"#244CCC"}),title:"اختلاف کشتار در کشتارگاه"})}),u.jsx(Z,{to:d()==="AdminX"?su:d()==="SuperAdmin"?nu:d()==="ProvinceOperator"?ou:d()==="CityOperator"?cu:"",children:u.jsx(uu,{icon:u.jsx(Fu,{size:30,color:"#244CCC"}),title:"افزایش حجم جوجه ریزی"})})]}),wu=U("CITY_INCREASE_HATCHING_SERVICE",async(n,{dispatch:o})=>{try{o(b());const{data:a,status:l}=awaitL.post("hatching-increase-request/",n);returno(_()),{data:a,status:l}}catch(a){returno(_()),{error:a.response.data.result}}}),Bu=U("CITY_EDIT_INCREASE_HATCHING_SERVICE",async(n,{dispatch:o})=>{try{o(b());const{data:a,status:l}=awaitL.put("hatching-increase-request/0/",n);returno(_()),{data:a,status:l}}catch(a){returno(_()),{error:a.response.data.result}}}),Gu=U("CITY_DELETE_INCREASE_HATCHING_SERVICE",async(n,{dispatch:o})=>{o(b());try{const{data:a,status:l}=awaitL.delete(`/hatching-increase-request/0/?key=${n}`);returno(_()),{data:a,status:l}}catch(a){returno(_()),{error:a.response.data.result}}});U("CITY_INCREASE_GET_HATCHING_SERVICE",asyncn=>{const{data:o,status:a}=awaitL.get("hatching-increase-request/",{params:n});return{data:o,status:a}});const$u=({item:n,updateTable:o})=>{consta=B(),[l,j]=h.useState(null),[s]=h.useContext(lu),S=E=>{j(E.currentTarget)},p=()=>{j(null)},g=!!l,A=g?"popover":void0;returnu.jsxs("div",{children:[u.jsx(X,{"aria-describedby":A,variant:"contained",color:"primary",onClick:S,children:u.jsx(Ou,{})}),u.jsx(Cu,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},id:A,open:g,anchorEl:l,onClose:p,children:u.jsx("div",{style:{padding:"20px"},children:u.jsx(i,{container:!0,direction:"column",children:u.jsx(hu,{title:"حذف",placement:"left-start",children:u.jsx(X,{"aria-label":"delete",color:"error",onClick:()=>{p(),a(Au({title:"آیا مطمئن هستید؟",content:u.jsxs(i,{container:!0,spacing:2,children:[u.jsx(i,{item:!0,children:u.jsx(v,{variant:"contained",color:"error",onClick:()=>{a(Gu(n==null?void0:n.key)).then(E=>{E.payload.error?s({vertical:"top",horizontal:"center",msg:E.payload.error,severity:"error"}):(o(),a(J()),s({vertical:"top",horizontal:"center",msg:E.payload.data.result,severity:"success"}))})},children:"تایید"})}),u.jsx(i,{item:!0,children:u.jsx(v,{onClick:()=>{a(J())},children:"لغو"})})]})}))},children:u.jsx(Hu,{})})})})})})]})},Mu=({updateTable:n,isEdit:o,item:a})=>{varD,N,I,k,O,f,F,C,e;const[l,j]=h.useSt