"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","Tag"],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 tag IDs to delete"}},required:["ids"]}}}},responses:(0,query_1.commonBulkDeleteResponses)("Categories"),requiresAuth:!0,permission:"delete.blog.tag",logModule:"ADMIN_BLOG",logTitle:"Bulk delete tags"};exports.default=async e=>{const{body:t,query:s,ctx:r}=e,{ids:a}=t;null==r||r.step("Validating tag IDs");null==r||r.step(`Deleting ${a.length} tags`);const l=await(0,query_1.handleBulkDelete)({model:"tag",ids:a,query:s});null==r||r.success(`${a.length} tags deleted successfully`);return l};