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 w,b as _,c as b,u as h}from"./outputWidgets.52de64cd.js";import"./console.4411c7a7.js";import"./index.8361ad88.js";import{C as k}from"./gateway.e1457457.js";import{A as v}from"./activeRecord.ebcbfc07.js";import{a as I}from"./asyncComputed.00e76dd1.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.70304edb.js";import"./index.a07ffcc5.js";import"./Form.09072055.js";import"./Title.baba2b21.js";import"./index.7800af0b.js";import"./index.c0e74c90.js";import"./index.e5d92658.js";import"./dayjs.7ad6aa6d.js";import"./index.5718341d.js";import"./index.3ed5d65c.js";import"./TabPane.c3c2f5a1.js";import"./index.396ff1b5.js";import"./CollapsePanel.d756b861.js";import"./index.9b3c2ba8.js";import"./index.f6c308cc.js";import"./index.f7915957.js";import"./index.1ebdd57a.js";import"./index.7fdb6bd8.js";import"./index.693f4596.js";import"./index.5a37ef67.js";import"./index.19e4a065.js";import"./pubsub.6e9aa6f2.js";import"./icons.bf6505eb.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]="d7c7afce-1c22-4613-a06e-d8fae119ebed",r._sentryDebugIdIdentifier="sentry-dbid-d7c7afce-1c22-4613-a06e-d8fae119ebed")}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 re=f({__name:"Files",setup(r){const t=g().params.projectId,{loading:a,result:p}=I(()=>m.list(t)),d=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],l=w(()=>{var i,s;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(s=(i=p.value)==null?void 0:i.map(o=>({key:o.key,cells:[{text:o.key},{text:o.size.toString()},{text:o.date.toDateString()}]})))!=null?s:[]}});return(i,s)=>(_(),b(D,{"entity-name":"File",loading:h(a),title:"Files",description:"Persist files on your projects.","empty-title":"No environment variables set",table:l.value,fields:d},null,8,["loading","table"]))}});export{re as default};
//# sourceMappingURL=Files.f957c6c9.js.map
