import{d as f,o as y,K as b,H as v,b as _,eu as g,f as l,w as a,u as s,eP as w,bE as x,aq as m}from"./outputWidgets.63450c6a.js";import{W as k}from"./workspaces.7927d7fb.js";import{E as i}from"./envVars.ca604fe5.js";import{C}from"./CrudView.6bcc0a2a.js";import{A as E}from"./index.0e2bc07e.js";import"./runnerData.389ea402.js";import"./url.181b4bfa.js";import"./record.884a3745.js";import"./pubsub.9ff806ef.js";import"./asyncComputed.4686243d.js";import"./Paragraph.b0baea90.js";import"./Text.3d888762.js";import"./Form.bd89de9c.js";import"./hasIn.1b20766f.js";import"./Modal.138f2689.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.336161d1.js";import"./BookOutlined.fe4a32cf.js";import"./router.b1520023.js";import"./popupNotifcation.ee18d946.js";import"./index.aeb802d2.js";import"./Title.05596582.js";import"./index.078560f6.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="68f1f3cf-54ec-495c-946b-54ed460b9cb4",n._sentryDebugIdIdentifier="sentry-dbid-68f1f3cf-54ec-495c-946b-54ed460b9cb4")}catch{}})();const h={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},L=f({__name:"EnvVarsEditor",setup(n){let o=null;y(()=>{o=setInterval(i.listComputed.refetch,2e3)}),b(()=>{o&&clearInterval(o)});function p(){var e;(e=k.computed.result.value)==null||e.openFile(".env")}const d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],c=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:w,label:"Delete",onClick:()=>r.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function u({key:e,value:t}){await i.create(e,t)}return(e,t)=>(_(),g("div",h,[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:d,live:"",onCreate:u},{secondary:a(()=>[l(s(x),{onClick:t[0]||(t[0]=r=>p())},{default:a(()=>[m("Open .env")]),_:1})]),extra:a(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:a(()=>[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"])]))}});export{L as default};
//# sourceMappingURL=EnvVarsEditor.6ace0cdc.js.map
