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,eQ as w,bE as x,aq as m}from"./outputWidgets.260a3c99.js";import{W as k}from"./workspaces.2f7f8b14.js";import{E as i}from"./envVars.6745b705.js";import{C}from"./CrudView.9c881ed3.js";import{A as E}from"./index.1d812c5e.js";import"./runnerData.90345b76.js";import"./url.13938513.js";import"./record.608c7c8c.js";import"./pubsub.ab27f2c0.js";import"./asyncComputed.61df0e0c.js";import"./Paragraph.482f5128.js";import"./Text.3b774738.js";import"./Form.46e378f9.js";import"./hasIn.8ab3cbf4.js";import"./Modal.6a26a016.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.e08dd3ee.js";import"./BookOutlined.9a33e452.js";import"./router.c6bba0da.js";import"./popupNotifcation.87bdba7f.js";import"./index.34fd2dd9.js";import"./Title.9673e08a.js";import"./index.a74fba23.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="0b326df2-20e0-4674-a094-f5c060e18b09",n._sentryDebugIdIdentifier="sentry-dbid-0b326df2-20e0-4674-a094-f5c060e18b09")}catch{}})();const h={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},L=f({__name:"EnvVarsEditor",setup(n){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 d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],u=v(()=>{var e,t;return{columns:[{name:"Key"},{name:"Value"},{name:""}],rows:(t=(e=i.listComputed.result.value)==null?void 0:e.map(a=>({key:a.key,cells:[{type:"text",text:a.key},{text:a.value,type:"secret"},{type:"actions",actions:[{icon:w,label:"Delete",onClick:()=>a.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({key:e,value:t}){await i.create(e,t)}return(e,t)=>(_(),g("div",h,[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:u.value,"create-button-text":"Add Environment Variable",fields:d,live:"",onCreate:c},{secondary:r(()=>[l(s(x),{onClick:t[0]||(t[0]=a=>p())},{default:r(()=>[m("Open .env")]),_:1})]),extra:r(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:r(()=>[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"])]))}});export{L as default};
//# sourceMappingURL=EnvVarsEditor.d731ce92.js.map
