"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 Category",operationId:"updateCategoryStatus",tags:["Admin","Content","Category"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the Category 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 Category (true for active, false for inactive)"}},required:["status"]}}}},responses:(0,query_1.updateRecordResponses)("Category"),requiresAuth:!0,permission:"edit.blog.category",logModule:"ADMIN_BLOG",logTitle:"Update category status"};exports.default=async t=>{const{body:e,params:a,ctx:s}=t,{id:r}=a,{status:o}=e;null==s||s.step("Validating category ID and status");null==s||s.step("Updating category status to "+(o?"active":"inactive"));const u=await(0,query_1.updateStatus)("category",r,o);null==s||s.success("Category status updated successfully");return u};