"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 comments",operationId:"bulkUpdateCommentStatus",tags:["Admin","Content","Comment"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",description:"Array of comment IDs to update",items:{type:"string"}},status:{type:"boolean",description:"New status to apply to the comments (true for active, false for inactive)"}},required:["ids","status"]}}}},responses:(0,query_1.updateRecordResponses)("Comment"),requiresAuth:!0,permission:"edit.blog.comment",logModule:"ADMIN_BLOG",logTitle:"Bulk update comment status"};exports.default=async t=>{const{body:e,ctx:s}=t,{ids:o,status:a}=e;null==s||s.step("Validating comment IDs and status");null==s||s.step(`Updating status to ${a?"active":"inactive"} for ${o.length} comments`);const u=await(0,query_1.updateStatus)("comment",o,a);null==s||s.success(`${o.length} comments status updated successfully`);return u};