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 g,H as w,b,c as _,u as h}from"./outputWidgets.7bdcec0a.js";import"./router.3986149f.js";import"./columns.6b51fbf2.js";import{C as k}from"./gateway.f622b899.js";import{A as v}from"./activeRecord.84d52553.js";import{a as I}from"./asyncComputed.cfb98789.js";import{C as D}from"./CrudView.82a1bc5a.js";import"./Title.9c0d0c5f.js";import"./index.15e46fc6.js";import"./index.f4ac7424.js";import"./pubsub.c455bec9.js";import"./icons.6934ad19.js";import"./Text.94a8ea41.js";import"./Form.f84b91b7.js";import"./url.5caacc63.js";import"./index.fa2fc691.js";import"./index.125aa6b3.js";import"./index.d2a75d88.js";import"./index.a9a6d5a2.js";import"./index.a2310446.js";import"./index.23129d61.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]="c5e72698-dcf6-432c-9f3d-4db13c801230",r._sentryDebugIdIdentifier="sentry-dbid-c5e72698-dcf6-432c-9f3d-4db13c801230")}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 T=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{T as default};
//# sourceMappingURL=Files.f9e4298e.js.map
