"use strict";(()=>{var e={};e.id=5676,e.ids=[5676],e.modules={72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6005:e=>{e.exports=require("node:crypto")},81013:(e,t,n)=>{n.r(t),n.d(t,{originalPathname:()=>A,patchFetch:()=>f,requestAsyncStorage:()=>y,routeModule:()=>l,serverHooks:()=>x,staticGenerationAsyncStorage:()=>m});var s={};n.r(s),n.d(s,{GET:()=>d});var a=n(49303),o=n(88716),r=n(60670),i=n(87070),c=n(19191),u=n(70446),p=n(90455);async function d(){let e=await (0,u.yK)(),t=(0,p.LP)(e),n=await (0,c.q)("/restaurants",{apiBase:"sysadmin",token:t,cache:"no-store"});return i.NextResponse.json(n.data)}let l=new a.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/sysadmin/restaurants/route",pathname:"/api/sysadmin/restaurants",filename:"route",bundlePath:"app/api/sysadmin/restaurants/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/sysadmin/restaurants/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:y,staticGenerationAsyncStorage:m,serverHooks:x}=l,A="/api/sysadmin/restaurants/route";function f(){return(0,r.patchFetch)({serverHooks:x,staticGenerationAsyncStorage:m})}},19191:(e,t,n)=>{n.d(t,{F:()=>r,q:()=>o});var s=n(47090),a=n(70446);async function o(e,t={}){let{apiBase:n="mobile",method:o="GET",body:r,token:i,langCode:c,notificationToken:u,headers:p={},revalidate:d,cache:l}=t,y=s.Y8[n],m=`${y}${e.startsWith("/")?e:"/"+e}`,x={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(x.Authorization=i),c&&(x.langCode=c);let A=u;if(!A)try{A=(await (0,a.Gg)()).fcmToken}catch{}A&&(x.notificationToken=A);let f={method:o,headers:x};r&&"GET"!==o&&(f.body=JSON.stringify(r)),void 0!==d&&(f.next={revalidate:d}),l&&(f.cache=l);let g=await fetch(m,f);if(!g.ok)throw Error(`API request failed: ${g.status} ${g.statusText}`);return g.json()}async function r(e,t={}){let{apiBase:n="mobile",method:o="GET",body:r,token:i,langCode:c,notificationToken:u,headers:p={}}=t,d=s.Y8[n],l=`${d}${e.startsWith("/")?e:"/"+e}`,y={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(y.Authorization=i),c&&(y.langCode=c);let m=u;if(!m)try{m=(await (0,a.Gg)()).fcmToken}catch{}m&&(y.notificationToken=m);let x={method:o,headers:y};return r&&"GET"!==o&&(x.body=JSON.stringify(r)),fetch(l,x)}},90455:(e,t,n)=>{function s(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function a(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}n.d(t,{I2:()=>a,LP:()=>s})},47090:(e,t,n)=>{n.d(t,{RF:()=>s,Y8:()=>o,pH:()=>a});let s=["al","en","it"],a={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},o={mobile:process.env.BABOON_API_MOBILE_URL,legacy:process.env.BABOON_API_URL,sysadmin:process.env.BABOON_API_SYSADMIN_URL,payment:process.env.BABOON_API_PAYMENT_URL}},70446:(e,t,n)=>{n.d(t,{Gg:()=>i,dx:()=>o,l7:()=>r,yK:()=>c});var s=n(78632),a=n(71615);let o={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},r={...o,cookieName:"baboon-admin-session"};async function i(){let e=await (0,a.cookies)();return(0,s.iW)(e,o)}async function c(){let e=await (0,a.cookies)();return(0,s.iW)(e,r)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),s=t.X(0,[8948,3314,8632,5972],()=>n(81013));module.exports=s})();