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