"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("@tanstack/react-query"),t=require("../apis/scopeApis.js"),a=require("../store/useEnvStore.js");exports.useApproveOrRejectVariantsMutation=function(){return r.useMutation({mutationFn:function(e){var r=e.variantIds,a=e.status,n=e.feedback,u=e.scopeId,s=e.is_deleted,i=e.appsecData;return t.ApproveOrRejectVariants({variant_ids:r,status:a,feedback:n,scopeId:u,is_deleted:s,appsecData:i})}})},exports.useApproverSearchQuery=function(a){var n=this;return r.useQuery({queryKey:["approver-search",a],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){var r;return e.__generator(this,function(e){switch(e.label){case 0:return[4,t.appsecGetUsersByQueryLite(a)];case 1:return[2,(null==(r=e.sent())?void 0:r.data)||[]]}})})},enabled:!!a.trim(),staleTime:3e4})},exports.useGetAppSecRolesQuery=function(a,n){var u=this;return void 0===n&&(n=!0),r.useQuery({queryKey:["appsec-roles",a],queryFn:function(){return e.__awaiter(u,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,t.GetAppsecRoles(a)];case 1:return[2,e.sent().data]}})})},enabled:n&&!!a,staleTime:1e5})},exports.useGroupSearchQuery=function(n){var u=this,s=a.default(function(e){var r;return null===(r=e.rbacConfig)||void 0===r?void 0:r.applicationId});return r.useQuery({queryKey:["group-search",s,n],queryFn:function(){return e.__awaiter(u,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,t.appsecGetUserGroups({appId:s,name:n})];case 1:return[2,e.sent().data]}})})},enabled:!!s,staleTime:3e4})};
//# sourceMappingURL=useApprovalQueries.js.map
