"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 and importance of support tickets",operationId:"bulkUpdateSupportTicketsStatusImportance",tags:["Admin","CRM","Support Ticket"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",description:"Array of support ticket IDs to update",items:{type:"string"}},status:{type:"string",description:"New status to apply to support tickets",enum:["PENDING","OPEN","REPLIED","CLOSED"]}},required:["ids","status"]}}}},responses:(0,query_1.updateRecordResponses)("SupportTicket"),requiresAuth:!0,permission:"edit.support.ticket",logModule:"ADMIN_SUP",logTitle:"Bulk update ticket status"};exports.default=async t=>{const{body:e,ctx:s}=t,{ids:u,status:p}=e;null==s||s.step("Updating ticket status");const r=await(0,query_1.updateStatus)("supportTicket",u,p);null==s||s.success("Ticket status updated");return r};