(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2564],{2134:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases",function(){return s(8096)}])},8096:(e,a,s)=>{"use strict";s.r(a),s.d(a,{DatabasesContext:()=>h,__N_SSP:()=>o,default:()=>j});var t=s(4848),n=s(6540),r=s(4725),l=s(3647),i=s(18),d=s(2992),c=s(4435);function u(){var e;let{databases:a,setTargetDatabase:s,user:r}=n.useContext(h);return(0,t.jsxs)(n.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,t.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,t.jsx)("h1",{className:"text-3xl m-0",children:"Databases"}),(0,t.jsxs)("a",{href:"/admin/".concat(null==r?void 0:r.id,"/databases/add-database"),className:"button flex items-center gap-2",children:[(0,t.jsx)("span",{className:"symbol",children:"+"}),(0,t.jsx)("span",{children:"Add Database"})]})]}),(0,t.jsx)(l.A,{user:r})]}),(null==r?void 0:null===(e=r.verification_status)||void 0===e?void 0:e.toString().match(/1/))?(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(d.A,{databases:a,setTargetDatabase:s,user:r}),(0,t.jsx)(c.A,{user:r})]}):(0,t.jsx)(i.A,{})]})}var x=s(1670),o=!0;let h=n.createContext({});function j(e){let{user:a,databases:s}=e,l=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"Databases | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[i,d]=n.useState();return(0,t.jsx)(h.Provider,{value:{user:a,databases:s,targetDatabase:i,setTargetDatabase:d},children:(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(r.A,{head:l,children:(0,t.jsx)(u,{})}),(0,t.jsx)(x.A,{targetDatabase:i})]})})}}},e=>{var a=a=>e(e.s=a);e.O(0,[1335,3348,4725,1840,636,6593,8792],()=>a(2134)),_N_E=e.O()}]);