import{d as f,o as y,L as v,H as b,b as _,ev as g,f as l,w as r,u as s,bG as w,ar as d}from"./outputWidgets.34ebc37e.js";import{W as x}from"./workspaces.604eb9e4.js";import{E as i}from"./envVars.2abadc72.js";import{i as k}from"./icons.8f30991f.js";import{C}from"./CrudView.8134f016.js";import{A as h}from"./index.ca74f710.js";import"./runnerData.cab67657.js";import"./url.c45872e6.js";import"./record.cbdf5e50.js";import"./pubsub.35a24abb.js";import"./asyncComputed.35a4b27a.js";import"./Paragraph.2cb0b8ab.js";import"./Base.1bb23522.js";import"./Typography.316976a3.js";import"./Form.38063bb5.js";import"./hasIn.58ff2131.js";import"./Modal.70683480.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.52f83311.js";import"./router.719f3d63.js";import"./popupNotifcation.9ce529ca.js";import"./index.5fefec1c.js";import"./Title.0157a531.js";import"./Text.979656fd.js";import"./index.e0c340f2.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]="6d46afe5-3c6a-4e13-a98f-175a5d7c4ecd",a._sentryDebugIdIdentifier="sentry-dbid-6d46afe5-3c6a-4e13-a98f-175a5d7c4ecd")}catch{}})();const E={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},R=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),v(()=>{o&&clearInterval(o)});function p(){var e;(e=x.computed.result.value)==null||e.openFile(".env")}const m=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],c=b(()=>{var e,t;return{columns:[{name:"Key"},{name:"Value"},{name:""}],rows:(t=(e=i.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 u({key:e,value:t}){await i.create(e,t)}return(e,t)=>(_(),g("div",E,[l(C,{"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:c.value,"create-button-text":"Add Environment Variable",fields:m,live:"",onCreate:u},{secondary:r(()=>[l(s(w),{onClick:t[0]||(t[0]=n=>p())},{default:r(()=>[d("Open .env")]),_:1})]),extra:r(()=>[l(s(h),{"show-icon":"",style:{"margin-top":"20px"}},{message:r(()=>[d(" 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"])]))}});export{R as default};
//# sourceMappingURL=EnvVarsEditor.82140c20.js.map
