1import{u as b,bL as y,r as j,a as N,j as e,B as u,L as v}from"./index-iGmwQs8V.js";import{p as x}from"./themes-X48ZCimW.js";import{F as w}from"./follow-button-USS9WM_y.js";import{u as k}from"./use-saved-location-DMD4amsr.js";import{M as p}from"./map-pin-oEy8DVjS.js";import{C as E}from"./chevron-left-CJp3KWoD.js";import"./useMutation-D33gQ4jW.js";import"./follow-level-menu-Dz5VlbMo.js";import"./use-push-opt-in-CRSM1Du4.js";import"./bell-BtYFfeF5.js";import"./chevron-down-CTg4eGqw.js";import"./pending-follow-6eRSaeQg.js";import"./plus-Dt5nDhA-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"89ec91d9d4056af97252b55c1192d233440b7a61"};var n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="331014c7-3198-4206-b8c2-69784fe9c506",t._sentryDebugIdIdentifier="sentry-dbid-331014c7-3198-4206-b8c2-69784fe9c506")}catch{}})();const h="space-y-6";function F(){const t=b(),{theme:n}=y.useParams(),{coords:r,save:g}=k(),[c,l]=j.useState(null),d=N({...t.coalition.listPartners.queryOptions({theme:n,lat:r?.lat??0,lng:r?.lng??0}),enabled:!!r}),a=d.data??null,o=a?.partners??[];function m(){if(typeof navigator>"u"||!navigator.geolocation){l("Location isnât available on this device.");return}navigator.geolocation.getCurrentPosition(s=>{l(null),g({lat:s.coords.latitude,lng:s.coords.longitude})},()=>l("We couldnât get your location. Turn it on and try again."))}if(r&&!d.isLoading&&!a)return e.jsxs("div",{className:h,children:[e.jsx(f,{}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"That network doesnât exist."})]});const i=a?.name??"Foodie Passport";return e.jsxs("div",{className:h,children:[e.jsx(f,{}),e.jsx("div",{className:`flex h-28 items-center justify-center overflow-hidden rounded-xl sm:h-36 ${x(a?.palette??"")}`,children:a?.bannerUrl?e.jsx("img",{src:a.bannerUrl,alt:"",className:"h-full w-full object-cover"}):e.jsx("span",{className:"text-xs font-semibold tracking-wide uppercase opacity-70",children:i})}),e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-xl font-bold",children:i}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:r?`${o.length} ${o.length===1?"partner":"partners"} near you. Visiting one fills a slot â nothing to scan.`:"Restaurants in this network near you."})]}),e.jsxs(u,{variant:"outline",size:"sm",onClick:m,children:[e.jsx(p,{className:"size-4"}),"Use my location"]})]}),c&&e.jsx("p",{className:"text-destructive mt-3 text-sm",children:c}),e.jsx("div",{className:"mt-6",children:r?d.isLoading?e.jsx("div",{className:"space-y-2",children:[1,2,3].map(s=>e.jsx("div",{className:"bg-muted h-14 animate-pulse rounded-lg"},s))}):o.length===0?e.jsxs("div",{className:"border-border text-muted-foreground rounded-xl border border-dashed text-center text-sm px-6 py-16",children:["No ",i," partners near you yet. New ones join all the time."]}):e.jsx("ul",{className:"space-y-1.5",children:o.map(s=>e.jsxs("li",{className:"border-border flex flex-wrap items-center gap-3 rounded-lg border p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold",children:s.restaurantName}),s.city&&e.jsx("p",{className:"text-muted-foreground text-xs",children:s.city})]}),e.jsx("span",{className:`ml-auto shrink-0 rounded-full px-2.5 py-1 text-xs font-semibold ${s.isPunched?x(a?.palette??""):"border-border text-muted-foreground border"}`,children:s.isPunched?"Stamped":"Not yet"}),e.jsxs("span",{className:"text-muted-foreground w-14 shrink-0 text-right text-xs tabular-nums",children:[s.distanceKm.toFixed(1)," km"]}),e.jsx("div",{className:"ml-auto",children:e.jsx(w,{restaurantId:s.restaurantId,name:s.restaurantName,isUnclaimed:!1})})]},s.restaurantId))}):e.jsxs("div",{className:"border-border text-muted-foreground rounded-xl border border-dashed text-center text-sm px-6 py-16",children:[e.jsx(p,{className:"mx-auto mb-2 size-5"}),e.jsxs("p",{children:["Share your location to see ",i," partners near you."]}),e.jsx(u,{size:"sm",className:"mt-4",onClick:m,children:"Use my location"})]})}),e.jsx("p",{className:"text-muted-foreground mt-6 text-xs",children:"Each partner decides what it gives when you spend a reward â youâll see it when you arrive."})]})}function f(){return e.jsxs(v,{to:"/me/passport",className:"text-primary mb-4 inline-flex items-center gap-1 text-xs font-semibold hover:underline",children:[e.jsx(E,{className:"size-3.5"}),"Back to your hunts"]})}export{F as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.