import{d as y,o as f,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.abde7be7.js";import{E as l,W as C}from"./workspaces.164de9bb.js";import{C as x}from"./ContentLayout.f6dd01ab.js";import{C as h}from"./CrudView.d2e5841c.js";import{A as E}from"./index.b3a8a88f.js";import"./asyncComputed.e188c84d.js";import"./runnerData.ab456c17.js";import"./url.578d50c3.js";import"./record.4adc9d27.js";import"./pubsub.7f579dee.js";import"./router.aff593c1.js";import"./Form.8489fb6d.js";import"./hasIn.b8f131ab.js";import"./gateway.e5c93921.js";import"./popupNotifcation.51a8836c.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.2107de83.js";import"./BookOutlined.ef6ccb36.js";import"./Modal.b9769244.js";import"./index.42ebfb5e.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]="43495459-da9d-43da-8113-eb048e0e9eea",a._sentryDebugIdIdentifier="sentry-dbid-43495459-da9d-43da-8113-eb048e0e9eea")}catch{}})();const q=y({__name:"EnvVarsEditor",setup(a){let o=null;f(()=>{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.d68e4a1e.js.map
