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