var u=Object.defineProperty;var y=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var i=(r,e,t)=>(y(r,typeof e!="symbol"?e+"":e,t),t);import{d as b,eA as g,J as w,b as f,c as _,u as h}from"./outputWidgets.cf5b7366.js";import"./router.565b4739.js";import"./index.2fa55c7c.js";import{C as k}from"./gateway.409ff644.js";import{A as v}from"./activeRecord.f30e02c2.js";import{a as I}from"./asyncComputed.2caa7fe6.js";import{C as D}from"./CrudView.ca1846b4.js";import"./Title.adce1298.js";import"./index.3d2fbf9e.js";import"./pubsub.664a70af.js";import"./icons.c510a141.js";import"./index.7622dd54.js";import"./Form.c8affe88.js";import"./url.fb40e08c.js";import"./index.47f17eed.js";import"./index.aee8b5d5.js";import"./index.9583d9e9.js";import"./index.10cdfb2c.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="867e669e-1c04-415e-ad31-3eb1681bc94b",r._sentryDebugIdIdentifier="sentry-dbid-867e669e-1c04-415e-ad31-3eb1681bc94b")}catch{}})();class C{constructor(){i(this,"urlPath","files")}async create(e){throw new Error("Not implemented")}async delete(e,t){throw new Error("Not implemented")}async get(e){throw new Error("Not implemented")}async update(e,t){throw new Error("Not implemented")}async list(e){return k.get(`projects/${e}/${this.urlPath}`)}}const l=new C;class c{constructor(e,t){i(this,"record");this.projectId=e,this.record=v.create(l,t,"id")}static async list(e){return(await l.list(e)).map(s=>new c(e,s))}get key(){return this.record.get("name")}get name(){return this.record.get("name")}get size(){return this.record.get("size")}get date(){return new Date(this.record.get("date"))}}const M=b({__name:"Files",setup(r){const t=g().params.projectId,{loading:s,result:d}=I(()=>c.list(t)),m=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],p=w(()=>{var a,n;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(n=(a=d.value)==null?void 0:a.map(o=>({key:o.key,cells:[{text:o.key},{text:o.size.toString()},{text:o.date.toDateString()}]})))!=null?n:[]}});return(a,n)=>(f(),_(D,{"entity-name":"File",loading:h(s),title:"Files",description:"Persist files on your projects.","empty-title":"No environment variables set",table:p.value,fields:m},null,8,["loading","table"]))}});export{M as default};
//# sourceMappingURL=Files.51b43924.js.map
