import{b3 as c}from"./index-ktJf6c6X.js";const u=c.injectEndpoints({endpoints:s=>({createProcess:s.mutation({query:({orderId:e,processKey:t,process:o})=>({url:`process/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,method:"POST",body:o,headers:{entityName:"Process"}})}),createProcessFromTemplate:s.mutation({query:({orderId:e,templateName:t,process:o})=>({url:`process/from-template/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,method:"POST",body:o,headers:{entityName:"Process"}})}),startProcess:s.mutation({query:({id:e,key:t})=>({url:`process/start/${e}/${encodeURIComponent(t)}`,method:"POST",body:{},headers:{entityName:"Process"}})}),updateProcess:s.mutation({query:({process:e})=>({url:"process",method:"PUT",body:e,headers:{entityName:"Process"}})}),createProcessQc:s.mutation({query:({qc:e})=>({url:"process/quality-check",method:"POST",body:e,headers:{entityName:"Process"}})}),getProcessById:s.query({query:({id:e})=>({url:`process/${e}`,method:"GET",headers:{entityName:"Process"}})}),getProcessDefinitions:s.query({query:()=>({url:"process-definition",method:"GET",headers:{entityName:"Process"}})}),getProcesses:s.query({query:({page:e=0,size:t=200,status:o,type:a,orderId:n})=>{const r=new URLSearchParams({page:String(e),size:String(t)});return o&&r.set("status",o),a&&r.set("type",a),n&&r.set("orderId",n),{url:`process?${r.toString()}`,method:"GET",headers:{entityName:"Process"}}}})})}),{useCreateProcessMutation:i,useCreateProcessFromTemplateMutation:y,useStartProcessMutation:P,useUpdateProcessMutation:d,useCreateProcessQcMutation:p,useGetProcessByIdQuery:h,useLazyGetProcessByIdQuery:q,useLazyGetProcessesQuery:f,useLazyGetProcessDefinitionsQuery:T}=u;export{q as a,d as b,p as c,P as d,i as e,h as f,f as u};
