"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Bulk deletes investments by IDs",operationId:"bulkDeleteInvestments",tags:["Admin","General","Investments"],parameters:(0,query_1.commonBulkDeleteParams)("Investments"),requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Array of investment IDs to delete"}},required:["ids"]}}}},responses:(0,query_1.commonBulkDeleteResponses)("Investments"),requiresAuth:!0,permission:"delete.investment",logModule:"ADMIN_FIN",logTitle:"Bulk Delete Investment History"};exports.default=async e=>{const{body:t,query:s,ctx:n}=e,{ids:r}=t;null==n||n.step("Validating investment IDs for bulk deletion");null==n||n.step("Bulk deleting investment records");const l=await(0,query_1.handleBulkDelete)({model:"investment",ids:r,query:s});null==n||n.success();return l};