import{d as f,o as y,L as b,H as v,b as _,ev as g,f as l,w as a,u as s,bG as w,ar as d}from"./outputWidgets.91c9f730.js";import{W as x}from"./workspaces.e0f5ccda.js";import{E as i}from"./envVars.bfc20846.js";import{i as k}from"./icons.e854b740.js";import{C}from"./CrudView.d1c2398f.js";import{A as h}from"./index.bf798f8b.js";import"./runnerData.08a2f6cc.js";import"./url.bd840ee9.js";import"./record.48aae23b.js";import"./pubsub.25829540.js";import"./asyncComputed.5cff1726.js";import"./Paragraph.18e7082b.js";import"./Base.79932679.js";import"./Typography.c7c5698a.js";import"./Form.f24a1c0a.js";import"./hasIn.d8588324.js";import"./Modal.41a7632f.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.05ceca6e.js";import"./router.e4c5e9fd.js";import"./popupNotifcation.e7a2b93a.js";import"./index.5a63d36f.js";import"./Title.69e80303.js";import"./Text.2f03529d.js";import"./index.946fdb2e.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]="773607eb-d188-4ad0-9394-240ef684d9f2",n._sentryDebugIdIdentifier="sentry-dbid-773607eb-d188-4ad0-9394-240ef684d9f2")}catch{}})();const E={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},R=f({__name:"EnvVarsEditor",setup(n){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function p(){var e;(e=x.computed.result.value)==null||e.openFile(".env")}const m=[{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(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("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:u.value,"create-button-text":"Add Environment Variable",fields:m,live:"",onCreate:c},{secondary:a(()=>[l(s(w),{onClick:t[0]||(t[0]=r=>p())},{default:a(()=>[d("Open .env")]),_:1})]),extra:a(()=>[l(s(h),{"show-icon":"",style:{"margin-top":"20px"}},{message:a(()=>[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{R as default};
//# sourceMappingURL=EnvVarsEditor.d0a5dce5.js.map
