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,c as _,u as h}from"./outputWidgets.9b7c29ed.js";import"./router.a8553211.js";import"./index.3302f04a.js";import{C as k}from"./gateway.3821173b.js";import{A as v}from"./activeRecord.264ba54c.js";import{a as I}from"./asyncComputed.6a414bed.js";import{C as D}from"./CrudView.73bf57c7.js";import"./Title.55bc3e25.js";import"./index.31be9da9.js";import"./pubsub.f1df5000.js";import"./icons.7c250a15.js";import"./index.ddedd1b8.js";import"./Form.77e50956.js";import"./url.c61c9940.js";import"./index.5695780b.js";import"./index.d8ed1958.js";import"./index.817f3ac7.js";import"./index.316bc1ac.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]="9e7243ad-3349-4f4d-a1f4-bc0466f29d42",r._sentryDebugIdIdentifier="sentry-dbid-9e7243ad-3349-4f4d-a1f4-bc0466f29d42")}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 c=new C;class d{constructor(e,t){i(this,"record");this.projectId=e,this.record=v.create(c,t,"id")}static async list(e){return(await c.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 M=f({__name:"Files",setup(r){const t=g().params.projectId,{loading:a,result:l}=I(()=>d.list(t)),m=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],p=w(()=>{var s,n;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(n=(s=l.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)=>(b(),_(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.12cf1643.js.map
