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.eddbac36.js";import"./console.56ba8e89.js";import"./index.c1e978a8.js";import{C as k}from"./gateway.e4ec4a58.js";import{A as v}from"./activeRecord.64b754df.js";import{a as I}from"./asyncComputed.fbd351ba.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.d009f8f3.js";import"./index.cc18f239.js";import"./Form.f5163eed.js";import"./Title.7ca27be1.js";import"./index.1a0ec4ff.js";import"./index.31447910.js";import"./index.9c583b89.js";import"./dayjs.d80a3524.js";import"./index.8318ec36.js";import"./index.8b693270.js";import"./TabPane.05333dfb.js";import"./index.b6a61078.js";import"./index.7a28d537.js";import"./index.d099a09e.js";import"./index.933610ff.js";import"./index.2c51d0a8.js";import"./index.b131e8f9.js";import"./index.3475d619.js";import"./index.f428cf3a.js";import"./pubsub.9aea5614.js";import"./icons.08aaa24c.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]="dc7af124-3684-4d3f-bbf9-54c178f711b7",r._sentryDebugIdIdentifier="sentry-dbid-dc7af124-3684-4d3f-bbf9-54c178f711b7")}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(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=f({__name:"Files",setup(r){const t=b().params.projectId,{loading:s,result:p}=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=p.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.d1fe0548.js.map
