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,eB as w,G as f,b as _,c as b,u as h}from"./outputWidgets.562826ac.js";import"./router.e5ce2c0b.js";import"./columns.29d297cf.js";import{C as k}from"./gateway.c80b0686.js";import{A as v}from"./activeRecord.6bb1bd7f.js";import{a as I}from"./asyncComputed.df2d9552.js";import{C as D}from"./CrudView.6f7097f4.js";import"./Base.bf8dc0b1.js";import"./FormItem.fc4e7da8.js";import"./transButton.17480f27.js";import"./Text.712cfc26.js";import"./Title.f7aaa881.js";import"./index.82606edc.js";import"./index.cf4c23b9.js";import"./pubsub.7185b91b.js";import"./icons.63405824.js";import"./url.5a1383d2.js";import"./index.01bf1f2c.js";import"./index.583cd440.js";import"./index.9cdd1b35.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]="19667684-5075-4e11-a179-22a7148c30ad",r._sentryDebugIdIdentifier="sentry-dbid-19667684-5075-4e11-a179-22a7148c30ad")}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 Q=g({__name:"Files",setup(r){const t=w().params.projectId,{loading:a,result:m}=I(()=>c.list(t)),d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],p=f(()=>{var s,n;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(n=(s=m.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:d},null,8,["loading","table"]))}});export{Q as default};
//# sourceMappingURL=Files.21cbcb99.js.map
