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