"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 deposit gateway",operationId:"updateDepositGatewayStatus",tags:["Admin","Deposit Gateways"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the deposit gateway 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)("Deposit Gateway"),requiresAuth:!0,permission:"edit.deposit.gateway",logModule:"ADMIN_FIN",logTitle:"Update deposit gateway status"};exports.default=async e=>{const{body:t,params:s,ctx:a}=e,{id:o}=s,{status:i}=t;null==a||a.step("Fetching deposit gateway record");null==a||a.step("Updating deposit gateway status");const p=await(0,query_1.updateStatus)("depositGateway",o,i);null==a||a.success("Deposit gateway status updated successfully");return p};