import{d as y,o as f,O as b,J as v,b as w,c as _,w as n,eS as g,f as l,u as s,bG as k,as as m}from"./outputWidgets.6e1c5425.js";import{W as C}from"./workspaces.0676e56f.js";import{E as i}from"./envVars.72a577f4.js";import{C as x}from"./ContentLayout.150390bd.js";import{C as h}from"./CrudView.88823d06.js";import{A as E}from"./index.0b7245cc.js";import"./runnerData.dbd7d7cb.js";import"./url.5357e9db.js";import"./record.c7d63161.js";import"./pubsub.4f3043c8.js";import"./asyncComputed.06ede41f.js";import"./router.4a0ba06b.js";import"./Form.b82a2cec.js";import"./hasIn.bf07751b.js";import"./popupNotifcation.76f4dd63.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.3a6e05dd.js";import"./BookOutlined.8202b78f.js";import"./Paragraph.4ce326b3.js";import"./Base.0277cf44.js";import"./Modal.e50e9e9a.js";import"./index.c12e1c2f.js";import"./Title.dfd37452.js";import"./Text.b10c1140.js";import"./index.1442882a.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]="2207c9a5-5401-4807-853f-6628a43dac04",a._sentryDebugIdIdentifier="sentry-dbid-2207c9a5-5401-4807-853f-6628a43dac04")}catch{}})();const R=y({__name:"EnvVarsEditor",setup(a){let o=null;f(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function p(){var e;(e=C.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:g,label:"Delete",onClick:()=>r.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({key:e,value:t}){await i.create(e,t)}return(e,t)=>(w(),_(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(k),{onClick:t[0]||(t[0]=r=>p())},{default:n(()=>[m("Open .env")]),_:1})]),extra:n(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:n(()=>[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"])]),_:1}))}});export{R as default};
//# sourceMappingURL=EnvVarsEditor.1c1d231e.js.map
