import{d as y,o as f,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 m}from"./outputWidgets.66cb3323.js";import{W as x}from"./workspaces.f83ce80a.js";import{E as i}from"./envVars.06a0ac3d.js";import{i as k}from"./icons.bf22aa40.js";import{C}from"./CrudView.4fbaeb64.js";import{A as h}from"./index.67ac4d72.js";import"./runnerData.a18d3892.js";import"./url.50176a21.js";import"./record.b20b5768.js";import"./pubsub.19cef690.js";import"./asyncComputed.e916adae.js";import"./Paragraph.de06c047.js";import"./Base.e0db6d09.js";import"./Typography.2ce150f4.js";import"./Form.6c3a2d9f.js";import"./hasIn.cda4df71.js";import"./Modal.7f50b274.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.f80c2df7.js";import"./router.0bc1d0d5.js";import"./popupNotifcation.9d486082.js";import"./index.c07575ec.js";import"./Title.dfc9c803.js";import"./Text.86e9a2de.js";import"./index.c1ed2dcd.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]="8e80078e-5919-4c18-ad25-b2aeb0988f68",n._sentryDebugIdIdentifier="sentry-dbid-8e80078e-5919-4c18-ad25-b2aeb0988f68")}catch{}})();const E={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},R=y({__name:"EnvVarsEditor",setup(n){let o=null;f(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function p(){var e;(e=x.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(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:d,live:"",onCreate:c},{secondary:a(()=>[l(s(w),{onClick:t[0]||(t[0]=r=>p())},{default:a(()=>[m("Open .env")]),_:1})]),extra:a(()=>[l(s(h),{"show-icon":"",style:{"margin-top":"20px"}},{message:a(()=>[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{R as default};
//# sourceMappingURL=EnvVarsEditor.fbab1af1.js.map
