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 b,b as w,c as _,u as h}from"./outputWidgets.541a6a3f.js";import"./console.7080c244.js";import"./index.56c0102f.js";import{C as k}from"./gateway.647cec74.js";import{A as v}from"./activeRecord.867c40fa.js";import{a as I}from"./asyncComputed.6496ca6b.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.af69973c.js";import"./index.1b1480b6.js";import"./Form.2a9acb85.js";import"./Title.3011141f.js";import"./index.7fb7f882.js";import"./index.33fb7a48.js";import"./index.5d5870f2.js";import"./dayjs.03d6e1d3.js";import"./index.f20ad580.js";import"./index.d89692b2.js";import"./TabPane.40396dd5.js";import"./index.ef35da09.js";import"./index.c3edc651.js";import"./index.dda022dd.js";import"./index.1797b918.js";import"./index.7f86f9a3.js";import"./index.68ffc7e6.js";import"./index.3cff0676.js";import"./index.07910c0e.js";import"./pubsub.8482a29f.js";import"./icons.fbbc5318.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]="56a9f095-1f49-43c5-9f92-ca3db237b479",r._sentryDebugIdIdentifier="sentry-dbid-56a9f095-1f49-43c5-9f92-ca3db237b479")}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 c=new N;class m{constructor(e,t){n(this,"record");this.projectId=e,this.record=v.create(c,t,"id")}static async list(e){return(await c.list(e)).map(a=>new m(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 ee=f({__name:"Files",setup(r){const t=g().params.projectId,{loading:a,result:p}=I(()=>m.list(t)),l=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],d=b(()=>{var s,i;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(i=(s=p.value)==null?void 0:s.map(o=>({key:o.key,cells:[{text:o.key},{text:o.size.toString()},{text:o.date.toDateString()}]})))!=null?i:[]}});return(s,i)=>(w(),_(D,{"entity-name":"File",loading:h(a),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.95b5618d.js.map
