import{e as x,E as k,r as y,b as T,P as j,$ as I,f,g as a,v as r,q as d,s as e,as as S,j as C,x as o,k as D,a0 as E,T as b,U as v,K as c,a1 as L,at as A,S as B,au as N,X as g,Y as R,D as V}from"./jwt-decode.esm-CX61wVx3.js";import{I as $}from"./PhMagnifyingGlass.vue-C4JZlKTc.js";import{a as F,b as P}from"./router-C3xfRTQ9.js";import"./tables-uXC0iev6.js";import{S as U}from"./systemTables-CTITfv8m.js";import{T as q}from"./TableCard-DY1KrKVd.js";import{_ as z}from"./TablesTabs.vue_vue_type_script_setup_true_lang-CUUcuC_z.js";import{u as K}from"./projectStore-VaavZXIZ.js";import"./ts.worker-DBbJtN2A.js";import"./string-BfaOmKtt.js";import"./AbstraButton.vue_vue_type_script_setup_true_lang-BBMaXQJu.js";import"./LoadingOutlined-CVkBHrpy.js";import"./HighlightedText-Dt8zryEd.js";import"./PhKey.vue-B8QZAw4x.js";import"./PhLockSimple.vue-9xY97cAM.js";import"./PhPencil.vue-3MngK8zN.js";import"./index-GnIaed8S.js";import"./member-Mqwx3LJ6.js";import"./project-BBDdDK81.js";import"./organizationSwitcher-BGkTY3e2.js";import"./organization-CGHGUCUV.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[l]="ed6b8762-4b8f-49f5-851c-82683fc50fa2",n._sentryDebugIdIdentifier="sentry-dbid-ed6b8762-4b8f-49f5-851c-82683fc50fa2")}catch{}})();const M={key:1,style:{padding:"1rem"}},X={style:{flex:"1"}},pe=x({__name:"SystemTables",setup(n){const l=K(),i=k([]),p=y(!1),u=y(""),_=T(()=>{if(!u.value)return i.value;const s=u.value.toLowerCase();return i.value.filter(t=>t.name.toLowerCase().includes(s))}),h=async s=>{p.value=!0;try{i.value=await U.list(s)}catch(t){V.error({message:c.translate("i18n_tablestabs_system_tables"),description:t instanceof Error?t.message:String(t)})}finally{p.value=!1}};return j(()=>l.projectId,s=>s&&h(s),{immediate:!0}),(s,t)=>{const w=I("RouterLink");return a(),f(g,null,[r(z),p.value?(a(),d(e(S),{key:0,style:{width:"100%","margin-top":"2rem"}})):(a(),f("div",M,[r(e(A),{justify:"space-between",align:"center",style:{"margin-bottom":"1rem"}},{default:o(()=>[D("div",X,[r(e(E),{level:3},{default:o(()=>[b(v(e(c).translate("i18n_tablestabs_system_tables")),1)]),_:1}),r(e(L),{type:"secondary"},{default:o(()=>[b(v(e(c).translate("i18n_systemtables_description")),1)]),_:1})])]),_:1}),i.value.length>0?(a(),d(e(B),{key:0,value:u.value,"onUpdate:value":t[0]||(t[0]=m=>u.value=m),placeholder:e(c).translate("i18n_systemtables_search_tables_placeholder"),"allow-clear":"",style:{"margin-bottom":"1rem","max-width":"400px"}},{prefix:o(()=>[r(e($),{size:16})]),_:1},8,["value","placeholder"])):C("",!0),_.value.length===0?(a(),d(e(N),{key:1,description:e(c).translate("i18n_systemtables_no_match")},null,8,["description"])):(a(),d(e(P),{key:2,gutter:[16,16]},{default:o(()=>[(a(!0),f(g,null,R(_.value,m=>(a(),d(e(F),{key:m.name,xs:24,sm:24,md:12,lg:12,xl:8,xxl:8},{default:o(()=>[r(w,{to:`/projects/${e(l).projectId}/system-tables/${m.name}`,style:{"text-decoration":"none",color:"inherit"}},{default:o(()=>[r(q,{table:m,"project-id":e(l).projectId,"show-edit-button":!1,"show-delete-button":!1,"read-only":!0},null,8,["table","project-id"])]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}))]))],64)}}});export{pe as default};
//# sourceMappingURL=SystemTables-Ik4DU4je.js.map
