import{a4 as f,i as e,M as u,t as k,f as h,g,_ as v}from"./app-JmgyQoR0.js";import{F as i}from"./link-UF1gGYGD.js";import{b as w,a as y,c,h as A,t as B,l as s,j as o,K as t,E as r,z as l,d as x}from"./vue-y3KLWBaS.js";const P={class:"_formRoot"},D=w({__name:"api",setup(T){const p=y(window.innerWidth>=1100);function _(){k(x(()=>v(()=>import("./MkTokenGenerateWindow-bgSBQwsC.js"),__vite__mapDeps([0,1,2,3]))),{},{done:async a=>{const{name:n,permissions:m}=a,{token:d}=await h("miauth/gen-token",{session:null,name:n,permission:m});g({type:"success",title:e.ts.token,text:d})}},"closed")}return c(()=>[]),c(()=>[]),f({title:"API",icon:"ph-key ph-bold ph-lg"}),(a,n)=>(A(),B("div",P,[s(u,{primary:"",class:"_formBlock",onClick:_},{default:o(()=>[t(r(l(e).ts.generateAccessToken),1)]),_:1}),s(i,{to:"/settings/apps",class:"_formBlock"},{default:o(()=>[t(r(l(e).ts.manageAccessTokens),1)]),_:1}),s(i,{to:"/api-console",behavior:p.value?"window":null,class:"_formBlock"},{default:o(()=>[t("API console")]),_:1},8,["behavior"])]))}});export{D as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["MkTokenGenerateWindow-bgSBQwsC.js","app-JmgyQoR0.js","vue-y3KLWBaS.js","app-9iivmIpH.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}