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.c072fe4e.js";import"./console.a87f2a82.js";import"./index.90440471.js";import{C as k}from"./gateway.18ca6e0a.js";import{A as v}from"./activeRecord.fdc25b97.js";import{a as I}from"./asyncComputed.376cdc00.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.9296340f.js";import"./index.00103e26.js";import"./Form.9f52866c.js";import"./Title.e3dcb8ea.js";import"./CollapsePanel.ecfd8c73.js";import"./index.d808811c.js";import"./index.ec8e038a.js";import"./index.dce83dc7.js";import"./dayjs.a56ae918.js";import"./index.4e6af937.js";import"./index.8ab39784.js";import"./TabPane.df5f41ca.js";import"./index.c5fd7926.js";import"./index.148bcdd7.js";import"./index.d9c3e0de.js";import"./index.e5a5efcd.js";import"./index.e7c5574b.js";import"./index.96de14c0.js";import"./index.28ce0851.js";import"./index.2e3640f1.js";import"./index.4cff163b.js";import"./pubsub.98ad9fe0.js";import"./icons.158b4825.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]="f00725fd-9fd9-4349-8d7b-bb14226ed32b",r._sentryDebugIdIdentifier="sentry-dbid-f00725fd-9fd9-4349-8d7b-bb14226ed32b")}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:d}=I(()=>m.list(t)),l=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}],c=g(()=>{var s,a;return{columns:[{name:"Name"},{name:"Size"},{name:"Date"}],rows:(a=(s=d.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:c.value,fields:l},null,8,["loading","table"]))}});export{re as default};
//# sourceMappingURL=Files.65072f7e.js.map
