import{d as y,o as f,N as b,I as v,b as w,c as _,w as n,eR as g,f as l,u as s,bF as k,ar as m}from"./outputWidgets.be3472c2.js";import{W as C}from"./workspaces.7dc978fb.js";import{E as i}from"./envVars.3bfc7529.js";import{C as x}from"./ContentLayout.8a64aff0.js";import{C as h}from"./CrudView.08af3b90.js";import{A as E}from"./index.1db198b0.js";import"./runnerData.c8a20a02.js";import"./url.7fe1be7b.js";import"./record.820df198.js";import"./pubsub.1063a0da.js";import"./asyncComputed.a619212b.js";import"./router.87bf43b6.js";import"./Form.254a7379.js";import"./hasIn.bddd0a1a.js";import"./popupNotifcation.9025cc7b.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.f9aebc41.js";import"./BookOutlined.53049b66.js";import"./Paragraph.7601abde.js";import"./Text.c9febe27.js";import"./Modal.304207b8.js";import"./index.ba676107.js";import"./Title.65752aa0.js";import"./index.6773e8c7.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]="a9eb1d7a-50d8-4c86-9c01-5fa99abc0494",a._sentryDebugIdIdentifier="sentry-dbid-a9eb1d7a-50d8-4c86-9c01-5fa99abc0494")}catch{}})();const P=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{P as default};
//# sourceMappingURL=EnvVarsEditor.52e2b4ff.js.map
