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 b,ez as g,H as w,b as f,c as _,u as h}from"./outputWidgets.a8447bcb.js";import"./router.8be149da.js";import"./columns.79610386.js";import{C as k}from"./gateway.9d217caa.js";import{A as v}from"./activeRecord.52c1b6f8.js";import{a as I}from"./asyncComputed.6c2627ea.js";import{C as D}from"./CrudView.996cd8b2.js";import"./Form.a869b3cf.js";import"./Title.4127a4b4.js";import"./transButton.26020e2e.js";import"./Text.722e2789.js";import"./index.41d49230.js";import"./index.f4ac7424.js";import"./pubsub.3b516de1.js";import"./icons.6de7af10.js";import"./url.0a1547fb.js";import"./index.ee9a096e.js";import"./index.c058ebd2.js";import"./index.823e1eed.js";import"./index.71f713cd.js";import"./index.5fa32c06.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]="7d525edc-7ab4-4237-a37e-b54cab08b148",r._sentryDebugIdIdentifier="sentry-dbid-7d525edc-7ab4-4237-a37e-b54cab08b148")}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(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 T=b({__name:"Files",setup(r){const t=g().params.projectId,{loading:a,result:l}=I(()=>c.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)=>(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{T as default};
//# sourceMappingURL=Files.e336de8d.js.map
