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