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.75a5b0b9.js";import"./console.3fb52eaf.js";import"./index.a131125e.js";import{C as k}from"./gateway.99e43695.js";import{A as v}from"./activeRecord.115270b9.js";import{a as I}from"./asyncComputed.c701d7b0.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.ff628288.js";import"./index.a1ee75ca.js";import"./Form.2c716183.js";import"./Title.b6c9692d.js";import"./index.b50eb903.js";import"./index.4598445f.js";import"./index.b6767512.js";import"./dayjs.d3366d83.js";import"./index.e24c456b.js";import"./index.7aacb57f.js";import"./TabPane.0d7849ee.js";import"./index.e9ba5796.js";import"./CollapsePanel.46ee4c6b.js";import"./index.3916405f.js";import"./index.5a67eb5f.js";import"./index.fe803cdf.js";import"./index.5e9c5434.js";import"./index.00d295c9.js";import"./index.fc88890c.js";import"./index.9c0809a0.js";import"./index.49e953af.js";import"./pubsub.3fa240d3.js";import"./icons.c04528be.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]="9578ff65-47b1-4d66-bcb1-00907957eb3d",r._sentryDebugIdIdentifier="sentry-dbid-9578ff65-47b1-4d66-bcb1-00907957eb3d")}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:c}=I(()=>m.list(t)),l=[{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=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)=>(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:l},null,8,["loading","table"]))}});export{re as default};
//# sourceMappingURL=Files.985ae68e.js.map
