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 m}from"./outputWidgets.049ac64d.js";import{E as l,W as C}from"./workspaces.3ec329b9.js";import{C as x}from"./ContentLayout.2a376971.js";import{C as h}from"./CrudView.ea10c7da.js";import{A as E}from"./index.c1842d07.js";import"./asyncComputed.ea730548.js";import"./runnerData.ea577873.js";import"./url.bfc1d6a1.js";import"./record.5a9ec5fd.js";import"./pubsub.0c3367ed.js";import"./router.2632e2a3.js";import"./Form.8d97bd19.js";import"./hasIn.8c8d3925.js";import"./gateway.c0f62b43.js";import"./popupNotifcation.836c9a92.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.07720f16.js";import"./BookOutlined.d451bbc7.js";import"./Modal.dcfdf87a.js";import"./index.dae82177.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]="88440adf-f08c-4e1d-9d80-74d2daf61198",a._sentryDebugIdIdentifier="sentry-dbid-88440adf-f08c-4e1d-9d80-74d2daf61198")}catch{}})();const q=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(l.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function d(){var e;(e=C.computed.result.value)==null||e.openFile(".env")}const p=[{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:p,live:"",onCreate:c},{secondary:r(()=>[i(s(w),{onClick:t[0]||(t[0]=n=>d())},{default:r(()=>[m("Open .env")]),_:1})]),extra:r(()=>[i(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:r(()=>[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{q as default};
//# sourceMappingURL=EnvVarsEditor.47f62568.js.map
