import{d as f,o as y,R as b,y as v,b as _,c as g,w as r,fd as k,f as i,u as s,bF as w,am as p}from"./outputWidgets.bff33647.js";import{E as l,W as C}from"./workspaces.be401238.js";import{C as x}from"./ContentLayout.406c6421.js";import{C as h}from"./CrudView.8a89e4ec.js";import{A as E}from"./index.c2396270.js";import"./asyncComputed.ce6d6eed.js";import"./runnerData.e179cd6d.js";import"./url.9e111d9b.js";import"./record.29a71a1c.js";import"./pubsub.897f848f.js";import"./router.8006b2c4.js";import"./Form.70e7f6b0.js";import"./hasIn.edcda2a9.js";import"./gateway.fd75c1ba.js";import"./popupNotifcation.29ddd2ec.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.2be6635f.js";import"./BookOutlined.62d0439b.js";import"./Modal.b7012161.js";import"./index.652b8bc4.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="fca91e29-6299-4a31-a14b-46aa2e6f69d2",o._sentryDebugIdIdentifier="sentry-dbid-fca91e29-6299-4a31-a14b-46aa2e6f69d2")}catch{}})();const q=f({__name:"EnvVarsEditor",setup(o){let a=null;y(()=>{a=setInterval(l.listComputed.refetch,2e3)}),b(()=>{a&&clearInterval(a)});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=l.listComputed.result.value)==null?void 0:e.map(n=>({key:n.key,cells:[{type:"text",text:n.key},{text:n.value,type:"secret"},{type:"actions",actions:[{icon:k,label:"Delete",onClick:()=>n.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({key:e,value:t}){await l.create(e,t)}return(e,t)=>(_(),g(x,null,{default:r(()=>[i(h,{"entity-name":"Env var",loading:s(l).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(()=>[i(s(w),{onClick:t[0]||(t[0]=n=>m())},{default:r(()=>[p("Open .env")]),_:1})]),extra:r(()=>[i(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:r(()=>[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{q as default};
//# sourceMappingURL=EnvVarsEditor.95851ac7.js.map
