"use strict";(()=>{var e={};e.id=3927,e.ids=[3927],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")},17732:(e,t,n)=>{n.r(t),n.d(t,{originalPathname:()=>g,patchFetch:()=>m,requestAsyncStorage:()=>y,routeModule:()=>d,serverHooks:()=>x,staticGenerationAsyncStorage:()=>v});var r={};n.r(r),n.d(r,{POST:()=>l});var o=n(49303),a=n(88716),s=n(60670),i=n(87070),c=n(19191),u=n(70446),p=n(90455);async function l(e){let t=await (0,u.Gg)(),n=(0,p.LP)(t),r=await e.json();try{let e=await (0,c.q)("/reviews",{apiBase:"legacy",method:"POST",token:n,body:r,cache:"no-store"});return i.NextResponse.json(e)}catch{return i.NextResponse.json({error:"Failed to save review"},{status:500})}}let d=new o.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/restaurants/review/route",pathname:"/api/restaurants/review",filename:"route",bundlePath:"app/api/restaurants/review/route"},resolvedPagePath:"/Users/ferlando/Desktop/baboon-nextjs/app/api/restaurants/review/route.ts",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:y,staticGenerationAsyncStorage:v,serverHooks:x}=d,g="/api/restaurants/review/route";function m(){return(0,s.patchFetch)({serverHooks:x,staticGenerationAsyncStorage:v})}},19191:(e,t,n)=>{n.d(t,{F:()=>s,q:()=>a});var r=n(47090),o=n(70446);async function a(e,t={}){let{apiBase:n="mobile",method:a="GET",body:s,token:i,langCode:c,notificationToken:u,headers:p={},revalidate:l,cache:d}=t,y=r.Y8[n],v=`${y}${e.startsWith("/")?e:"/"+e}`,x={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(x.Authorization=i),c&&(x.langCode=c);let g=u;if(!g)try{g=(await (0,o.Gg)()).fcmToken}catch{}g&&(x.notificationToken=g);let m={method:a,headers:x};s&&"GET"!==a&&(m.body=JSON.stringify(s)),void 0!==l&&(m.next={revalidate:l}),d&&(m.cache=d);let A=await fetch(v,m);if(!A.ok)throw Error(`API request failed: ${A.status} ${A.statusText}`);return A.json()}async function s(e,t={}){let{apiBase:n="mobile",method:a="GET",body:s,token:i,langCode:c,notificationToken:u,headers:p={}}=t,l=r.Y8[n],d=`${l}${e.startsWith("/")?e:"/"+e}`,y={"Content-Type":"application/json","User-Agent":"BaboonWeb",...p};i&&(y.Authorization=i),c&&(y.langCode=c);let v=u;if(!v)try{v=(await (0,o.Gg)()).fcmToken}catch{}v&&(y.notificationToken=v);let x={method:a,headers:y};return s&&"GET"!==a&&(x.body=JSON.stringify(s)),fetch(d,x)}},90455:(e,t,n)=>{function r(e){return e.token?e.token:e.user?.token?e.user.token:process.env.BABOON_APP_BUSINESS_TOKEN||""}function o(){return process.env.BABOON_APP_BUSINESS_TOKEN||""}n.d(t,{I2:()=>o,LP:()=>r})},47090:(e,t,n)=>{n.d(t,{RF:()=>r,Y8:()=>a,pH:()=>o});let r=["al","en","it"],o={AL:{latitude:41.327546,longitude:19.818698,cityId:1,countryId:1},XK:{latitude:42.662914,longitude:21.165503,cityId:2,countryId:2}},a={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:()=>a,l7:()=>s,yK:()=>c});var r=n(78632),o=n(71615);let a={password:process.env.SESSION_SECRET,cookieName:"baboon-session",cookieOptions:{secure:!0,httpOnly:!0,sameSite:"lax",maxAge:604800}},s={...a,cookieName:"baboon-admin-session"};async function i(){let e=await (0,o.cookies)();return(0,r.iW)(e,a)}async function c(){let e=await (0,o.cookies)();return(0,r.iW)(e,s)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),r=t.X(0,[8948,3314,8632,5972],()=>n(17732));module.exports=r})();