"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Bulk deletes comments by IDs",operationId:"bulkDeleteComments",tags:["Admin","Content","Comment"],parameters:(0,query_1.commonBulkDeleteParams)("Comments"),requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Array of comment IDs to delete"}},required:["ids"]}}}},responses:(0,query_1.commonBulkDeleteResponses)("Comments"),requiresAuth:!0,permission:"delete.blog.comment",logModule:"ADMIN_BLOG",logTitle:"Bulk delete comments"};exports.default=async e=>{const{body:t,query:s,ctx:o}=e,{ids:n}=t;null==o||o.step("Validating comment IDs");null==o||o.step(`Deleting ${n.length} comments`);const r=await(0,query_1.handleBulkDelete)({model:"comment",ids:n,query:s});null==o||o.success(`${n.length} comments deleted successfully`);return r};