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