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,G as g,b as w,c as _,u as h}from"./outputWidgets.0fb707c7.js";import"./router.81de177d.js";import"./columns.37a1e6f7.js";import{C as k}from"./gateway.7ee47e62.js";import{A as v}from"./activeRecord.204186f3.js";import{a as I}from"./asyncComputed.a0ca296c.js";import{C as D}from"./CrudView.e365e55f.js";import"./Form.0dcb97c0.js";import"./Title.f00a58f9.js";import"./transButton.220177fb.js";import"./Text.3ec0a64d.js";import"./index.140c5bc8.js";import"./index.cf4c23b9.js";import"./pubsub.7d8bce56.js";import"./icons.24a85994.js";import"./url.d43b75f5.js";import"./index.85d2f01b.js";import"./index.8dbf2994.js";import"./index.0d3d2205.js";import"./index.e8ef1073.js";import"./index.a2e845fd.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]="fab13f02-ef2b-4dbb-a5f3-203eb9e307e1",r._sentryDebugIdIdentifier="sentry-dbid-fab13f02-ef2b-4dbb-a5f3-203eb9e307e1")}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 m=new C;class l{constructor(e,t){i(this,"record");this.projectId=e,this.record=v.create(m,t,"id")}static async list(e){return(await m.list(e)).map(a=>new l(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 T=f({__name:"Files",setup(r){const t=b().params.projectId,{loading:a,result:c}=I(()=>l.list(t)),d=[{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=c.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:d},null,8,["loading","table"]))}});export{T as default};
//# sourceMappingURL=Files.688754c0.js.map
