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 b,J as g,b as w,c as _,u as h}from"./outputWidgets.1f391ab3.js";import"./console.3edc9cde.js";import"./index.e8fb5940.js";import{C as k}from"./gateway.98993b50.js";import{A as v}from"./activeRecord.b9964a93.js";import{a as I}from"./asyncComputed.56fb497e.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.fc3376a4.js";import"./index.a24e4cfd.js";import"./Form.d88e907e.js";import"./Title.e19c9b7e.js";import"./CollapsePanel.ed22c9ce.js";import"./index.3daa08be.js";import"./index.beaf06d8.js";import"./index.16917afa.js";import"./dayjs.12321a58.js";import"./index.06f9a351.js";import"./index.130e9d58.js";import"./TabPane.49afc3f4.js";import"./index.a2705008.js";import"./index.257ed691.js";import"./index.72e9f57c.js";import"./index.4260e6cf.js";import"./index.f0baefdd.js";import"./index.37b8f4ea.js";import"./index.18aa8459.js";import"./index.d09067f1.js";import"./index.6e066317.js";import"./pubsub.ab26e051.js";import"./icons.35fd2af6.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]="bf3b223f-1025-4b3a-9eb8-eef7281bfe24",r._sentryDebugIdIdentifier="sentry-dbid-bf3b223f-1025-4b3a-9eb8-eef7281bfe24")}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=b().params.projectId,{loading:i,result:l}=I(()=>m.list(t)),c=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],d=g(()=>{var s,a;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(a=(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?a:[]}});return(s,a)=>(w(),_(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:c},null,8,["loading","table"]))}});export{re as default};
//# sourceMappingURL=Files.f08d5159.js.map
