import{d as f,o as y,O as b,J as v,b as w,c as _,w as n,eS as g,f as l,u as s,bG as k,as as m}from"./outputWidgets.eb498848.js";import{W as C}from"./workspaces.04f3ac75.js";import{E as i}from"./envVars.a4215f23.js";import{C as x}from"./ContentLayout.e6c532b6.js";import{C as h}from"./CrudView.c7c3d33a.js";import{A as E}from"./index.d4197b75.js";import"./runnerData.c01bfcd7.js";import"./url.1d686ce1.js";import"./record.7cc6fca0.js";import"./pubsub.1ca1fb40.js";import"./asyncComputed.6b2a5298.js";import"./router.dc5374c0.js";import"./Form.bd9a7b94.js";import"./hasIn.ceb11556.js";import"./popupNotifcation.1234df84.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.083d7014.js";import"./BookOutlined.d5ff4087.js";import"./Paragraph.82d8120c.js";import"./Base.60455d70.js";import"./Modal.19adabd3.js";import"./index.60acdd5f.js";import"./Title.ef0a0830.js";import"./Text.c3630863.js";import"./index.98ba73a6.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="63ff6548-5b27-40fe-a8f3-223379c65410",a._sentryDebugIdIdentifier="sentry-dbid-63ff6548-5b27-40fe-a8f3-223379c65410")}catch{}})();const R=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function p(){var e;(e=C.computed.result.value)==null||e.openFile(".env")}const u=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],d=v(()=>{var e,t;return{columns:[{name:"Key"},{name:"Value"},{name:""}],rows:(t=(e=i.listComputed.result.value)==null?void 0:e.map(r=>({key:r.key,cells:[{type:"text",text:r.key},{text:r.value,type:"secret"},{type:"actions",actions:[{icon:g,label:"Delete",onClick:()=>r.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({key:e,value:t}){await i.create(e,t)}return(e,t)=>(w(),_(x,null,{default:n(()=>[l(h,{"entity-name":"Env var",loading:s(i).listComputed.loading.value,title:"Environment Variables",description:"Set environment variables for your project.","empty-title":"No environment variables set",table:d.value,"create-button-text":"Add Environment Variable",fields:u,live:"",onCreate:c},{secondary:n(()=>[l(s(k),{onClick:t[0]||(t[0]=r=>p())},{default:n(()=>[m("Open .env")]),_:1})]),extra:n(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:n(()=>[m(" This is simply a helper to manage your environment variables locally. The variables set here will not be deployed to Cloud with your project. ")]),_:1})]),_:1},8,["loading","table"])]),_:1}))}});export{R as default};
//# sourceMappingURL=EnvVarsEditor.be6e8447.js.map
