import{d as f,o as y,O as b,J as v,b as _,c as g,w as n,eS as k,f as l,u as s,bG as w,as as p}from"./outputWidgets.2c936b33.js";import{W as C}from"./workspaces.b564ff43.js";import{E as i}from"./envVars.70fcdfa2.js";import{C as x}from"./ContentLayout.ba6345c2.js";import{C as h}from"./CrudView.b9ba563d.js";import{A as E}from"./index.427b14e9.js";import"./runnerData.02c403dc.js";import"./url.a282f1d5.js";import"./record.210736c4.js";import"./pubsub.4c454988.js";import"./asyncComputed.b227690c.js";import"./router.9a76cc66.js";import"./Form.b5e24132.js";import"./hasIn.85b27717.js";import"./popupNotifcation.a42892dc.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.dd7fbd1a.js";import"./BookOutlined.31cb7ffb.js";import"./Paragraph.51f31516.js";import"./Base.7b44942c.js";import"./Modal.17cdde78.js";import"./index.18754ce2.js";import"./Title.6affb5db.js";import"./Text.a2f30647.js";import"./index.f0d39170.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]="5e2c755b-ee62-4088-b167-fad5dd639f62",a._sentryDebugIdIdentifier="sentry-dbid-5e2c755b-ee62-4088-b167-fad5dd639f62")}catch{}})();const R=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function m(){var e;(e=C.computed.result.value)==null||e.openFile(".env")}const d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"multiline-text"}],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(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(w),{onClick:t[0]||(t[0]=r=>m())},{default:n(()=>[p("Open .env")]),_:1})]),extra:n(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:n(()=>[p(" 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.0dfd976f.js.map
