"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Update Status for a Comment",operationId:"updateCommentStatus",tags:["Admin","Content","Comment"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the Comment to update",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{status:{type:"boolean",description:"New status to apply to the Comment (true for active, false for inactive)"}},required:["status"]}}}},responses:(0,query_1.updateRecordResponses)("Comment"),requiresAuth:!0,permission:"edit.blog.comment",logModule:"ADMIN_BLOG",logTitle:"Update comment status"};exports.default=async t=>{const{body:e,params:s,ctx:a}=t,{id:o}=s,{status:n}=e;null==a||a.step("Validating comment ID and status");null==a||a.step("Updating comment status to "+(n?"active":"inactive"));const u=await(0,query_1.updateStatus)("comment",o,n);null==a||a.success("Comment status updated successfully");return u};