import{jasc,awasd,axasS}from"./mui-vendor-CkIVaoQP.js";import{rasl}from"./react-vendor-CmFgShSM.js";import{aasg,uasv,fasy}from"./redux-vendor-B7uoacJt.js";import{LasC,jasx,hasi,A,Gas_,aeasf,afasE}from"./index-Vwb3Bce5.js";constI=g("PROVINCE_UPDATE_SLAUGHTER_KILLPLACE_SERVICE",async(t,{dispatch:a})=>{try{a(C());const{data:r,status:s}=awaitx.put("kill_house_percent/0/",t);returna(i()),{data:r,status:s}}catch(r){returna(i()),{error:r.response.data.result}}}),N=({killHouseForKiller:t,slaughterKey:a,disabled:r})=>{consts=v(),[o]=l.useContext(A),[p,h]=l.useState(t==null?void0:t.key),{slaughterGetKillerKillhouses:n}=y(e=>e.slaughterSlice),m=e=>{s(I({percentage_key:a,kill_house_key:e.target.value})).then(u=>{u.payload.error?o({vertical:"top",horizontal:"center",msg:u.payload.error,severity:"error"}):(s(f()),s(E()),o({vertical:"top",horizontal:"center",msg:"عملیات با موفقیت انجام شد.",severity:"success"}))}),h(e.target.value)};returnc.jsx(_,{container:!0,alignItems:"center",justifyContent:"center",children:c.jsx(d,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:p,onChange:m,style:{width:"170px"},size:"small",disabled:r,children:n==null?void0:n.map((e,u)=>c.jsx(S,{value:e.key,children:e.name},u))})})};export{NasP};