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,ez as b,H as g,b as w,c as _,u as h}from"./outputWidgets.8a1294ac.js";import"./router.e765b2a2.js";import"./columns.a2ad5768.js";import{C as k}from"./gateway.ec720fac.js";import{A as v}from"./activeRecord.4f50a80e.js";import{a as I}from"./asyncComputed.3699cd44.js";import{C as D}from"./CrudView.707fb9d1.js";import"./Title.c5e29cf7.js";import"./index.04ab96ef.js";import"./index.f4ac7424.js";import"./pubsub.5ff7800d.js";import"./icons.25b21aee.js";import"./index.21148e20.js";import"./Form.1860c0ed.js";import"./url.9a5c0e6d.js";import"./index.d5d7d1dc.js";import"./index.4fc6eb1b.js";import"./index.91683b65.js";import"./index.bf7f5369.js";import"./index.0f4f2049.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]="13d5bbf2-d4ba-4a4a-9464-fd9f85d94da9",r._sentryDebugIdIdentifier="sentry-dbid-13d5bbf2-d4ba-4a4a-9464-fd9f85d94da9")}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 d{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(a=>new d(e,a))}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 Q=f({__name:"Files",setup(r){const t=b().params.projectId,{loading:a,result:m}=I(()=>d.list(t)),c=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],p=g(()=>{var s,n;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(n=(s=m.value)==null?void 0:s.map(o=>({key:o.key,cells:[{text:o.key},{text:o.size.toString()},{text:o.date.toDateString()}]})))!=null?n:[]}});return(s,n)=>(w(),_(D,{"entity-name":"File",loading:h(a),title:"Files",description:"Persist files on your projects.","empty-title":"No environment variables set",table:p.value,fields:c},null,8,["loading","table"]))}});export{Q as default};
//# sourceMappingURL=Files.19c35b5d.js.map
