import{d as f,o as y,O as b,J as v,b as _,c as g,w as n,eS as k,f as l,u as s,bG as w,as as p}from"./outputWidgets.e32c4de9.js";import{W as C}from"./workspaces.75a5079a.js";import{E as i}from"./envVars.c5ba9658.js";import{C as x}from"./ContentLayout.5912ffdb.js";import{C as h}from"./CrudView.7262a743.js";import{A as E}from"./index.ad13a0c4.js";import"./runnerData.9bc53e5d.js";import"./url.b82290c2.js";import"./record.f085fb76.js";import"./pubsub.574e50fa.js";import"./asyncComputed.cd8e83d5.js";import"./router.d15ff954.js";import"./Form.6e618181.js";import"./hasIn.e17bd528.js";import"./popupNotifcation.63897623.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.bcdaf646.js";import"./BookOutlined.c9465756.js";import"./Paragraph.27861c63.js";import"./Base.583225bc.js";import"./Modal.3e62e331.js";import"./index.66b88b11.js";import"./Title.e20804f9.js";import"./Text.81365b40.js";import"./index.5d1f98c6.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]="803f5dfa-900c-4a38-888a-1935423556b5",a._sentryDebugIdIdentifier="sentry-dbid-803f5dfa-900c-4a38-888a-1935423556b5")}catch{}})();const R=f({__name:"EnvVarsEditor",setup(a){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function m(){var e;(e=C.computed.result.value)==null||e.openFile(".env")}const u=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"multiline-text"}],d=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:k,label:"Delete",onClick:()=>r.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({key:e,value:t}){await i.create(e,t)}return(e,t)=>(_(),g(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:d.value,"create-button-text":"Add Environment Variable",fields:u,live:"",onCreate:c},{secondary:n(()=>[l(s(w),{onClick:t[0]||(t[0]=r=>m())},{default:n(()=>[p("Open .env")]),_:1})]),extra:n(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:n(()=>[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{R as default};
//# sourceMappingURL=EnvVarsEditor.fc75d9a7.js.map
