import{J as b}from"./index-UcVXCjOs.js";import{a4 as M,i as e,M as C,f as S,q as x,P as F}from"./app-JmgyQoR0.js";import{F as j}from"./link-UF1gGYGD.js";import{F as B}from"./section-yxO0GkeZ.js";import{b as N,a as K,c as _,D as i,h as r,i as c,j as t,l,K as p,E as m,z as d,u as P,t as V,G as D,F as H,H as L}from"./vue-y3KLWBaS.js";const w={class:"_formLinks"},G=N({__name:"registry",setup(E){let o=K(null);function u(){S("i/registry/scopes").then(s=>{o.value=s.slice().sort((a,n)=>a.join("/").localeCompare(n.join("/")))})}async function f(){const{canceled:s,result:a}=await x(e.ts._registry.createKey,{key:{type:"string",label:e.ts._registry.key},value:{type:"string",multiline:!0,label:e.ts.value},scope:{type:"string",label:e.ts._registry.scope}});s||F("i/registry/set",{scope:a.scope.split("/"),key:a.key,value:b.parse(a.value)}).then(()=>{u()})}u();const g=_(()=>[]),k=_(()=>[]);return M({title:e.ts.registry,icon:"ph-gear-six ph-bold ph-lg"}),(s,a)=>{const n=i("MkPageHeader"),h=i("MkSpacer"),v=i("MkStickyContainer");return r(),c(v,null,{header:t(()=>[l(n,{actions:g.value,tabs:k.value},null,8,["actions","tabs"])]),default:t(()=>[l(h,{"content-max":600,"margin-min":16},{default:t(()=>[l(C,{primary:"",onClick:f},{default:t(()=>[p(m(d(e).ts._registry.createKey),1)]),_:1}),o.value?(r(),c(B,{key:0},{label:t(()=>[p(m(d(e).ts.system),1)]),default:t(()=>[P("div",w,[(r(!0),V(H,null,D(o.value,y=>(r(),c(j,{to:`/registry/keys/system/${y.join("/")}`,class:"_monospace"},{default:t(()=>[p(m(y.join("/")),1)]),_:2},1032,["to"]))),256))])]),_:1})):L("",!0)]),_:1})]),_:1})}}});export{G as default};
