import{bq as r,br as d,a9 as u,_ as v}from"./index-BiWH3VAt.js";var l={},h=r;Object.defineProperty(l,"__esModule",{value:!0});var m=l.default=void 0,p=h(d()),f=u;m=l.default=(0,p.default)((0,f.jsx)("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined");var c={},y=r;Object.defineProperty(c,"__esModule",{value:!0});var A=c.default=void 0,_=y(d()),q=u;A=c.default=(0,_.default)((0,q.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1m-2-3h1v3h-1zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1zm0-2h1v1h-1z"}),"PictureAsPdfOutlined");var o={},L=r;Object.defineProperty(o,"__esModule",{value:!0});var g=o.default=void 0,I=L(d()),S=u;g=o.default=(0,I.default)((0,S.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zM6 20V4h7v5h5v11z"}),"InsertDriveFileOutlined");const $=v.injectEndpoints({endpoints:t=>({saveLeadAttachment:t.mutation({query:({file:e,leadId:n,followUpId:s,category:i})=>{const a=new FormData;return a.append("file",e),n!=null&&a.append("leadId",String(n)),s!=null&&a.append("followUpId",String(s)),i&&a.append("category",i),{url:"lead/attachment",method:"POST",body:a}}}),getAttachmentsByLeadId:t.query({query:e=>`lead/attachment/by-lead/${e}`}),deleteLeadAttachment:t.mutation({query:e=>({url:`lead/attachment/${e}`,method:"DELETE"}),invalidatesTags:["LeadAttachment"]}),getAttachmentsByFollowUpId:t.query({query:e=>`lead/attachment/by-follow-up/${e}`,providesTags:["LeadAttachment"]}),downloadAttachment:t.query({query:e=>({url:`lead/attachment/${e}/download`,responseHandler:n=>n.blob()})}),saveLeadAttachmentS3:t.mutation({query:e=>({url:"lead/attachment/save-s3",method:"POST",body:e}),invalidatesTags:["LeadAttachment"]})}),overrideExisting:!1}),{useSaveLeadAttachmentMutation:x,useGetAttachmentsByLeadIdQuery:z,useDeleteLeadAttachmentMutation:D,useGetAttachmentsByFollowUpIdQuery:M,useLazyDownloadAttachmentQuery:O,useSaveLeadAttachmentS3Mutation:H}=$;export{A as a,g as b,D as c,m as d,H as u};
