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 g,eA as w,J as b,b as f,c as _,u as h}from"./outputWidgets.dcbaec6c.js";import"./router.fe36cb8d.js";import"./index.2b422cbf.js";import{C as k}from"./gateway.f4357ae1.js";import{A as v}from"./activeRecord.d9292c93.js";import{a as I}from"./asyncComputed.05eefdbd.js";import{C as D}from"./CrudView.4ac6b440.js";import"./Title.137468a8.js";import"./index.678801af.js";import"./pubsub.999268d8.js";import"./icons.eaf14b7d.js";import"./index.9fcba2ca.js";import"./Form.94b2db91.js";import"./url.5c03711e.js";import"./index.69bd7c01.js";import"./index.12134aed.js";import"./index.87a757a5.js";import"./index.a56c5205.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]="a42e20e9-aca0-466b-b41a-29718c50d97e",r._sentryDebugIdIdentifier="sentry-dbid-a42e20e9-aca0-466b-b41a-29718c50d97e")}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(a=>new c(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 M=g({__name:"Files",setup(r){const t=w().params.projectId,{loading:a,result:d}=I(()=>c.list(t)),m=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],p=b(()=>{var s,n;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(n=(s=d.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)=>(f(),_(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:m},null,8,["loading","table"]))}});export{M as default};
//# sourceMappingURL=Files.d49cab1d.js.map
