import{_ as u}from"./index-BiWH3VAt.js";const o=u.injectEndpoints({endpoints:a=>({saveTask:a.mutation({query:s=>({url:"tasks",method:"POST",body:s}),invalidatesTags:["SalesTask"]}),updateTask:a.mutation({query:s=>({url:"tasks",method:"PUT",body:s}),invalidatesTags:["SalesTask"]}),getTaskFullById:a.query({query:s=>`tasks/full/${s}`,providesTags:["SalesTask"]}),getTasksByPage:a.mutation({query:({criteria:s,page:e,size:t})=>({url:`tasks/search-by-criteria?page=${e}&size=${t}`,method:"POST",body:s})}),deleteTask:a.mutation({query:s=>({url:`tasks/${s}`,method:"DELETE"}),invalidatesTags:["SalesTask"]}),assignTask:a.mutation({query:({id:s,body:e})=>({url:`tasks/${s}/assign`,method:"POST",body:e}),invalidatesTags:["SalesTask"]}),updateTaskStatus:a.mutation({query:({id:s,body:e})=>({url:`tasks/${s}/status`,method:"PATCH",body:e}),invalidatesTags:["SalesTask"]}),getChecklist:a.query({query:s=>`tasks/${s}/checklist`,providesTags:["SalesTask"]}),addChecklistItem:a.mutation({query:({id:s,...e})=>({url:`tasks/${s}/checklist`,method:"POST",body:e}),invalidatesTags:["SalesTask"]}),toggleChecklistItem:a.mutation({query:({itemId:s,done:e})=>({url:`tasks/checklist/${s}?done=${e}`,method:"PATCH"}),invalidatesTags:["SalesTask"]}),getComments:a.query({query:s=>`tasks/${s}/comments`,providesTags:["SalesTask"]}),addComment:a.mutation({query:({id:s,body:e})=>({url:`tasks/${s}/comment`,method:"POST",body:{body:e}}),invalidatesTags:["SalesTask"]}),getTimeline:a.query({query:s=>`tasks/${s}/timeline`,providesTags:["SalesTask"]}),listAttachments:a.query({query:s=>`tasks/${s}/attachments`,providesTags:["SalesTask"]}),saveAttachment:a.mutation({query:s=>({url:"tasks/attachment/save-s3",method:"POST",body:s}),invalidatesTags:["SalesTask"]}),deleteAttachment:a.mutation({query:s=>({url:`tasks/attachment/${s}`,method:"DELETE"}),invalidatesTags:["SalesTask"]}),getSalespersonTaskDashboard:a.query({query:()=>"tasks/dashboard/salesperson",providesTags:["SalesTask"]}),getManagerTaskDashboard:a.query({query:()=>"tasks/dashboard/manager",providesTags:["SalesTask"]}),getTaskProductivity:a.query({query:({from:s,to:e})=>`tasks/report/productivity?from=${s}&to=${e}`}),getTaskEnums:a.query({query:()=>"tasks/enums"})}),overrideExisting:!1}),{useSaveTaskMutation:k,useUpdateTaskMutation:n,useGetTaskFullByIdQuery:i,useLazyGetTaskFullByIdQuery:r,useGetTasksByPageMutation:m,useDeleteTaskMutation:l,useAssignTaskMutation:y,useUpdateTaskStatusMutation:d,useGetChecklistQuery:g,useAddChecklistItemMutation:h,useToggleChecklistItemMutation:c,useGetCommentsQuery:q,useAddCommentMutation:S,useGetTimelineQuery:v,useListAttachmentsQuery:p,useSaveAttachmentMutation:$,useDeleteAttachmentMutation:P,useGetSalespersonTaskDashboardQuery:A,useGetManagerTaskDashboardQuery:C,useGetTaskProductivityQuery:M,useGetTaskEnumsQuery:E}=o;export{k as a,n as b,r as c,m as d,i as e,d as f,y as g,h,c as i,S as j,P as k,A as l,C as m,E as u};
