"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Bulk deletes pages by IDs",operationId:"bulkDeletePages",tags:["Admin","Content","Page"],parameters:(0,query_1.commonBulkDeleteParams)("Pages"),requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Array of page IDs to delete"}},required:["ids"]}}}},responses:(0,query_1.commonBulkDeleteResponses)("Pages"),requiresAuth:!0,permission:"delete.page",logModule:"ADMIN_CMS",logTitle:"Bulk delete pages"};exports.default=async e=>{const{body:s,query:t,ctx:r}=e,{ids:l}=s;null==r||r.step(`Bulk deleting ${(null==l?void 0:l.length)||0} page(s)`);const a=await(0,query_1.handleBulkDelete)({model:"page",ids:l,query:t});null==r||r.success("Successfully deleted page(s)");return a};