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 n=(r,e,t)=>(y(r,typeof e!="symbol"?e+"":e,t),t);import{d as f,eA as g,J as w,b as _,c as b,u as h}from"./outputWidgets.b43a489b.js";import"./console.bbd86620.js";import"./index.d989c562.js";import{C as k}from"./gateway.38461683.js";import{A as v}from"./activeRecord.2bc5cc59.js";import{a as I}from"./asyncComputed.a42e75bb.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.85d5e2a7.js";import"./index.42b92ee8.js";import"./Form.1797df89.js";import"./Title.47040052.js";import"./CollapsePanel.3e5384f9.js";import"./index.523f4a12.js";import"./index.65dea612.js";import"./index.9c88be1a.js";import"./dayjs.caeff4fe.js";import"./index.0279b5ff.js";import"./index.956893d2.js";import"./TabPane.b49c19a0.js";import"./index.0887e3a5.js";import"./index.a775b9cf.js";import"./index.e641ddba.js";import"./index.479accfd.js";import"./index.9367a16c.js";import"./index.8df4e710.js";import"./index.2fc0be8f.js";import"./index.8a60ee51.js";import"./index.85f24c29.js";import"./pubsub.6fd47a9d.js";import"./icons.de9af46a.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]="73528269-1619-48a1-8262-c9bd3d662eef",r._sentryDebugIdIdentifier="sentry-dbid-73528269-1619-48a1-8262-c9bd3d662eef")}catch{}})();class N{constructor(){n(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 p=new N;class m{constructor(e,t){n(this,"record");this.projectId=e,this.record=v.create(p,t,"id")}static async list(e){return(await p.list(e)).map(i=>new m(e,i))}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 re=f({__name:"Files",setup(r){const t=g().params.projectId,{loading:i,result:c}=I(()=>m.list(t)),l=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],d=w(()=>{var s,a;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(a=(s=c.value)==null?void 0:s.map(o=>({key:o.key,cells:[{text:o.key},{text:o.size.toString()},{text:o.date.toDateString()}]})))!=null?a:[]}});return(s,a)=>(_(),b(D,{"entity-name":"File",loading:h(i),title:"Files",description:"Persist files on your projects.","empty-title":"No environment variables set",table:d.value,fields:l},null,8,["loading","table"]))}});export{re as default};
//# sourceMappingURL=Files.4a372576.js.map
