import{d as f,o as y,R as b,D as v,b as _,c as g,w as r,eS as k,f as l,u as s,bI as w,au as p}from"./outputWidgets.7323a17d.js";import{E as i,W as C}from"./envVars.aca3130c.js";import{C as x}from"./ContentLayout.143d2119.js";import{C as h}from"./CrudView.e2192329.js";import{A as E}from"./index.28672a8c.js";import"./runnerData.e86765fc.js";import"./url.50c4a8f0.js";import"./record.1f033572.js";import"./pubsub.2c3883f4.js";import"./asyncComputed.a50f21d4.js";import"./router.7bb92c0e.js";import"./Form.4d35a934.js";import"./hasIn.adc00278.js";import"./popupNotifcation.4e57751c.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.d07c372f.js";import"./BookOutlined.22bb6522.js";import"./Paragraph.1e67eefb.js";import"./Base.003f7172.js";import"./Modal.8e6a9189.js";import"./index.42443749.js";import"./Title.88a7d0e4.js";import"./Text.a0b69008.js";import"./index.211f7220.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]="40037d6a-ef56-4f05-b876-4065a17b3d8b",a._sentryDebugIdIdentifier="sentry-dbid-40037d6a-ef56-4f05-b876-4065a17b3d8b")}catch{}})();const P=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 d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"multiline-text"}],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:k,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(x,null,{default:r(()=>[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:r(()=>[l(s(w),{onClick:t[0]||(t[0]=n=>m())},{default:r(()=>[p("Open .env")]),_:1})]),extra:r(()=>[l(s(E),{"show-icon":"",style:{"margin-top":"20px"}},{message:r(()=>[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{P as default};
//# sourceMappingURL=EnvVarsEditor.c3d25b7d.js.map
