"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Bulk updates the status of categories",operationId:"bulkUpdateTagStatus",tags:["Admin","Content","Category"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",description:"Array of tag IDs to update",items:{type:"string"}},status:{type:"boolean",description:"New status to apply to the categories (true for active, false for inactive)"}},required:["ids","status"]}}}},responses:(0,query_1.updateRecordResponses)("Tag"),requiresAuth:!0,permission:"edit.blog.tag",logModule:"ADMIN_BLOG",logTitle:"Bulk update tag status"};exports.default=async t=>{const{body:e,ctx:s}=t,{ids:a,status:u}=e;null==s||s.step("Validating tag IDs and status");null==s||s.step(`Updating status to ${u?"active":"inactive"} for ${a.length} tags`);const o=await(0,query_1.updateStatus)("tag",a,u);null==s||s.success(`${a.length} tags status updated successfully`);return o};