import{d as f,o as y,K as b,H as v,b as _,eu as g,f as l,w as r,u as s,eP as w,bF as x,aq as d}from"./outputWidgets.1c4947c7.js";import{W as k}from"./workspaces.bc120589.js";import{E as i}from"./envVars.0b2f36d2.js";import{C}from"./CrudView.54cbe4c4.js";import{A as h}from"./index.9a13ccca.js";import"./runnerData.79bc4400.js";import"./url.ca3e5e32.js";import"./record.438e3693.js";import"./pubsub.87f1efb9.js";import"./asyncComputed.ab9c45d0.js";import"./Paragraph.110c4a21.js";import"./Text.4ed32514.js";import"./Form.cba5cdce.js";import"./hasIn.58acd238.js";import"./Modal.5c7e6d3c.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.f7859d2d.js";import"./router.f814fb07.js";import"./popupNotifcation.bd532d77.js";import"./index.a9af7b0b.js";import"./Title.6f4ab7f6.js";import"./index.83f629a7.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]="04fcef6c-331f-4c94-862d-7ca5a4b106b8",a._sentryDebugIdIdentifier="sentry-dbid-04fcef6c-331f-4c94-862d-7ca5a4b106b8")}catch{}})();const E={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},J=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function p(){var e;(e=k.computed.result.value)==null||e.openFile(".env")}const m=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],c=v(()=>{var e,t;return{columns:[{name:"Key"},{name:"Value"},{name:""}],rows:(t=(e=i.listComputed.result.value)==null?void 0:e.map(n=>({key:n.key,cells:[{type:"text",text:n.key},{text:n.value,type:"secret"},{type:"actions",actions:[{icon:w,label:"Delete",onClick:()=>n.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function u({key:e,value:t}){await i.create(e,t)}return(e,t)=>(_(),g("div",E,[l(C,{"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:c.value,"create-button-text":"Add Environment Variable",fields:m,live:"",onCreate:u},{secondary:r(()=>[l(s(x),{onClick:t[0]||(t[0]=n=>p())},{default:r(()=>[d("Open .env")]),_:1})]),extra:r(()=>[l(s(h),{"show-icon":"",style:{"margin-top":"20px"}},{message:r(()=>[d(" 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"])]))}});export{J as default};
//# sourceMappingURL=EnvVarsEditor.c594cc6b.js.map
