"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 withdrawal method",operationId:"updateWithdrawMethodStatus",tags:["Admin","Withdraw Methods"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the withdrawal method 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)("Withdraw Method"),requiresAuth:!0,permission:"edit.withdraw.method",logModule:"ADMIN_FIN",logTitle:"Update Method Status"};exports.default=async t=>{const{body:e,params:s,ctx:a}=t,{id:d}=s,{status:r}=e;null==a||a.step("Updating withdraw method status");const o=await(0,query_1.updateStatus)("withdrawMethod",d,r);null==a||a.success("Withdraw method status updated successfully");return o};