import{b1 as c}from"./index-DlNZgIG9.js";const m=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,useLazyGetProcessByIdQuery:h,useLazyGetProcessesQuery:q,useLazyGetProcessDefinitionsQuery:f}=m;export{h as a,d as b,p as c,P as d,i as e,q as u};
