"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Deletes a specific Admin Profit record",operationId:"deleteAdminProfit",tags:["Admin","Finance","Profits"],logModule:"ADMIN_FIN",logTitle:"Delete Profit",parameters:[{name:"id",in:"path",description:"ID of the Admin Profit to delete",required:!0,schema:{type:"string"}},{name:"restore",in:"query",description:"Restore the Admin Profit instead of deleting",required:!1,schema:{type:"boolean"}},{name:"force",in:"query",description:"Delete the Admin Profit permanently",required:!1,schema:{type:"boolean"}}],responses:{200:{description:"Admin Profit deleted successfully",content:{"application/json":{schema:{type:"object",properties:{message:{type:"string"}}}}}}},permission:"delete.admin.profit",requiresAuth:!0};exports.default=async e=>{const{params:t,query:i,ctx:r}=e,{id:s}=t;null==r||r.step("Deleting admin profit");const o=await(0,query_1.handleSingleDelete)({model:"adminProfit",id:s,query:i});null==r||r.success("Admin profit deleted successfully");return o};