import{d as f,o as y,O as b,J as v,b as _,c as g,w as n,eS as k,f as l,u as s,bG as w,as as p}from"./outputWidgets.aedb9989.js";import{W as C}from"./workspaces.2012f094.js";import{E as i}from"./envVars.4d445b18.js";import{C as x}from"./ContentLayout.de71297a.js";import{C as h}from"./CrudView.aa5100f4.js";import{A as E}from"./index.a8361507.js";import"./runnerData.64e03784.js";import"./url.c520dda4.js";import"./record.168f9da8.js";import"./pubsub.96a03d8f.js";import"./asyncComputed.710d44a6.js";import"./router.c6e9e955.js";import"./Form.cfc41f21.js";import"./hasIn.468b611c.js";import"./popupNotifcation.f175fce5.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.f112c775.js";import"./BookOutlined.2df3b27a.js";import"./Paragraph.077143bd.js";import"./Base.1e4eebff.js";import"./Modal.6d96e682.js";import"./index.5834849d.js";import"./Title.a34b96de.js";import"./Text.b2be5925.js";import"./index.3574c638.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]="fc363225-f7a4-4490-bedd-8160d23ac3ce",a._sentryDebugIdIdentifier="sentry-dbid-fc363225-f7a4-4490-bedd-8160d23ac3ce")}catch{}})();const R=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function m(){var e;(e=C.computed.result.value)==null||e.openFile(".env")}const d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"multiline-text"}],u=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:k,label:"Delete",onClick:()=>r.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({key:e,value:t}){await i.create(e,t)}return(e,t)=>(_(),g(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:u.value,"create-button-text":"Add Environment Variable",fields:d,live:"",onCreate:c},{secondary:n(()=>[l(s(w),{onClick:t[0]||(t[0]=r=>m())},{default:n(()=>[p("Open .env")]),_:1})]),extra:n(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:n(()=>[p(" 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.ff34b9d8.js.map
