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 f,eA as g,J as w,b as _,c as b,u as h}from"./outputWidgets.d94fff8c.js";import"./router.4a188c48.js";import"./index.a5166b6d.js";import{C as k}from"./gateway.8dd534ee.js";import{A as v}from"./activeRecord.4bb9e983.js";import{a as I}from"./asyncComputed.6da48dd7.js";import{C as D}from"./CrudView.e6c5592c.js";import"./Title.c70c7e79.js";import"./index.3dad0da1.js";import"./pubsub.39314a92.js";import"./icons.fec42461.js";import"./index.7d7e00b1.js";import"./Form.57801503.js";import"./url.596d80c9.js";import"./index.e7f021ad.js";import"./index.3709b59d.js";import"./index.0f14f01f.js";import"./index.209f6c1c.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]="ed562fd5-fd8c-4ee8-9ae9-3f260554c778",r._sentryDebugIdIdentifier="sentry-dbid-ed562fd5-fd8c-4ee8-9ae9-3f260554c778")}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 d=new C;class c{constructor(e,t){i(this,"record");this.projectId=e,this.record=v.create(d,t,"id")}static async list(e){return(await d.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=f({__name:"Files",setup(r){const t=g().params.projectId,{loading:s,result:l}=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=l.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)=>(_(),b(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.fce8e4df.js.map
