import{d as f,o as y,K as b,H as v,b as _,eu as g,f as l,w as r,u as s,eQ as w,bE as x,aq as m}from"./outputWidgets.cb8d4118.js";import{W as k}from"./workspaces.7c770739.js";import{E as i}from"./envVars.0aa492ca.js";import{C}from"./CrudView.e3bbbbbe.js";import{A as E}from"./index.99a2c642.js";import"./runnerData.c466048a.js";import"./url.f415825b.js";import"./record.3c2cc598.js";import"./pubsub.6650fe4e.js";import"./asyncComputed.602f821b.js";import"./Paragraph.bf76481e.js";import"./Text.9ccde808.js";import"./Form.ecb5a9ca.js";import"./hasIn.9378fb46.js";import"./Modal.6ccabc4f.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.3ef122e0.js";import"./BookOutlined.8ba19dd1.js";import"./router.86733c93.js";import"./popupNotifcation.901fafde.js";import"./index.20961092.js";import"./Title.0c6e5569.js";import"./index.6c0be9cd.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]="8610012c-97b6-4400-b75f-7a8fa9beb822",a._sentryDebugIdIdentifier="sentry-dbid-8610012c-97b6-4400-b75f-7a8fa9beb822")}catch{}})();const h={style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"40px 120px"}},L=f({__name:"EnvVarsEditor",setup(a){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"}],u=v(()=>{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:w,label:"Delete",onClick:()=>n.delete(),dangerous:!0}]}]})))!=null?t:[]}});async function c({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:u.value,"create-button-text":"Add Environment Variable",fields:d,live:"",onCreate:c},{secondary:r(()=>[l(s(x),{onClick:t[0]||(t[0]=n=>p())},{default:r(()=>[m("Open .env")]),_:1})]),extra:r(()=>[l(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"])]))}});export{L as default};
//# sourceMappingURL=EnvVarsEditor.4ec005a6.js.map
