import{a7 as a,a4 as t,aQ as i}from"./index-dNe6i2rS.js";const u=a.injectEndpoints({endpoints:s=>({getApps:s.query({query:({pId:e})=>({url:`project/${e}/apps`}),transformResponse:e=>e.items??[],providesTags:[{type:t.ProjectTags.Job,id:"APPS_LIST"}]}),getApp:s.query({query:({pId:e,name:p})=>({url:`project/${e}/apps/${p}`}),providesTags:i.cacheByArgProperties(t.ProjectTags.Job,["pId","name"]),extraOptions:{skipError:!0}}),redeployApp:s.mutation({query:({pId:e,name:p})=>({url:`project/${e}/apps/${p}/redeploy`,method:"post"}),invalidatesTags:(e,p,{pId:r,name:o})=>[{type:t.ProjectTags.Job,id:"APPS_LIST"},{type:t.ProjectTags.Job,id:`${r}-${o}`}]}),toggleAppPublic:s.mutation({query:({pId:e,name:p,enabled:r})=>({url:`project/${e}/apps/${p}/public`,method:"post",data:{enabled:r}}),invalidatesTags:(e,p,{pId:r,name:o})=>[{type:t.ProjectTags.Job,id:"APPS_LIST"},{type:t.ProjectTags.Job,id:`${r}-${o}`}]})})}),{useGetAppsQuery:y,useGetAppQuery:g,useRedeployAppMutation:n,useToggleAppPublicMutation:T}=u;export{n as a,T as b,g as c,y as u};
