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 b,eA as f,J as g,b as w,c as _,u as h}from"./outputWidgets.b9aa154a.js";import"./console.ee73e2aa.js";import"./index.4d631048.js";import{C as k}from"./gateway.5aa82c5f.js";import{A as v}from"./activeRecord.8939db5d.js";import{a as I}from"./asyncComputed.9bda3979.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.8866a12f.js";import"./index.ade1bec6.js";import"./Form.55f226f4.js";import"./Title.6cd833fd.js";import"./index.74d4e484.js";import"./index.6b140cad.js";import"./index.29aa7167.js";import"./dayjs.d2a09bae.js";import"./index.ea68e603.js";import"./index.bb85a084.js";import"./TabPane.3d00468a.js";import"./index.ab1855db.js";import"./index.14f3ef13.js";import"./index.eb23b22d.js";import"./index.45ef6041.js";import"./index.45ac8fb9.js";import"./index.004b987c.js";import"./index.23063916.js";import"./index.55488473.js";import"./pubsub.967f482a.js";import"./icons.4ed83c58.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]="35ee553c-950a-4535-973f-bd1b9037eb7b",r._sentryDebugIdIdentifier="sentry-dbid-35ee553c-950a-4535-973f-bd1b9037eb7b")}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(s=>new m(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 ee=b({__name:"Files",setup(r){const t=f().params.projectId,{loading:s,result:c}=I(()=>m.list(t)),l=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],d=g(()=>{var a,i;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(i=(a=c.value)==null?void 0:a.map(o=>({key:o.key,cells:[{text:o.key},{text:o.size.toString()},{text:o.date.toDateString()}]})))!=null?i:[]}});return(a,i)=>(w(),_(D,{"entity-name":"File",loading:h(s),title:"Files",description:"Persist files on your projects.","empty-title":"No environment variables set",table:d.value,fields:l},null,8,["loading","table"]))}});export{ee as default};
//# sourceMappingURL=Files.22cc837e.js.map
