"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 Binary Market",operationId:"updateBinaryMarketStatus",tags:["Admin","Binary Markets"],parameters:[{index:0,name:"id",in:"path",required:!0,description:"ID of the Binary Market 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 Binary Market (true for active, false for inactive)"}},required:["status"]}}}},responses:(0,query_1.updateRecordResponses)("Binary Market"),requiresAuth:!0,permission:"edit.binary.market",logModule:"ADMIN_BINARY",logTitle:"Update binary market status"};exports.default=async e=>{const{body:t,params:a,ctx:r}=e,{id:s}=a,{status:i}=t;null==r||r.step("Fetching binary market record");null==r||r.step("Updating binary market status");const u=await(0,query_1.updateStatus)("binaryMarket",s,i);null==r||r.success("Binary market status updated successfully");return u};