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