"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 sliders",operationId:"bulkUpdateSliderStatus",tags:["Admin","Sliders"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",description:"Array of slider IDs to update",items:{type:"string"}},status:{type:"boolean",description:"New status to apply to the sliders (true for active, false for inactive)"}},required:["ids","status"]}}}},responses:(0,query_1.updateRecordResponses)("Slider"),requiresAuth:!0,permission:"edit.slider",logModule:"ADMIN_CMS",logTitle:"Bulk update slider status"};exports.default=async e=>{const{body:t,ctx:s}=e,{ids:r,status:i}=t;null==s||s.step(`Updating status of ${(null==r?void 0:r.length)||0} slider(s) to ${i?"active":"inactive"}`);const a=await(0,query_1.updateStatus)("slider",r,i);null==s||s.success("Successfully updated slider status");return a};