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.a4629ff8.js";import"./router.ab2ac3ba.js";import"./columns.464a3bb5.js";import{C as k}from"./gateway.68939de7.js";import{A as v}from"./activeRecord.a2b7d343.js";import{a as I}from"./asyncComputed.fb8b9ba6.js";import{C as D}from"./CrudView.a5b1a4eb.js";import"./Title.cf2a531e.js";import"./index.339c7421.js";import"./index.f4ac7424.js";import"./pubsub.25dc8c41.js";import"./icons.73bff2ab.js";import"./Text.eb216708.js";import"./Form.ab59726f.js";import"./url.d6a620b9.js";import"./index.874565bb.js";import"./index.48817ebe.js";import"./index.0f6dde5f.js";import"./index.46db6cb2.js";import"./index.56cfba6d.js";import"./index.fda4c602.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]="ebaf2217-f636-48e7-8f11-fd5503e3396c",r._sentryDebugIdIdentifier="sentry-dbid-ebaf2217-f636-48e7-8f11-fd5503e3396c")}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(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:m}=I(()=>c.list(t)),d=[{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=m.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:d},null,8,["loading","table"]))}});export{T as default};
//# sourceMappingURL=Files.c918d4eb.js.map
