module.exports=[45736,a=>a.a(async(b,c)=>{try{var d=a.i(9823),e=a.i(27669),f=a.i(40882),g=b([f]);[f]=g.then?(await g)():g,a.s(["default",0,(a,b)=>{let c=(0,d.useRouter)(),{user:g,hasPermission:h}=(0,f.useUser)();(0,e.useEffect)(()=>{g&&!h(a,b)&&c.push("/")},[g,a,c,h,b])}]),c()}catch(a){c(a)}},!1),59424,a=>a.a(async(b,c)=>{try{var d=a.i(8171),e=a.i(81232),f=a.i(70134),g=a.i(47928),h=a.i(82799),i=a.i(40882),j=a.i(62125),k=a.i(5999),l=a.i(39353),m=a.i(9823),n=a.i(8453),o=b([f,g,h,i,j]);[f,g,h,i,j]=o.then?(await o)():o;let p=(0,k.default)("components.Discover.DiscoverWatchlist",{discoverwatchlist:"Your Watchlist",watchlist:"Plex Watchlist"});a.s(["default",0,()=>{let a=(0,n.useIntl)(),b=(0,m.useRouter)(),{user:c}=(0,i.useUser)({id:Number(b.query.userId)}),{user:k}=(0,i.useUser)(),{isLoadingInitialData:o,isEmpty:q,isLoadingMore:r,isReachingEnd:s,titles:t,fetchMore:u,error:v,mutate:w}=(0,h.default)(`/api/v1/${b.pathname.startsWith("/profile")?`user/${k?.id}`:b.query.userId?`user/${b.query.userId}`:"discover"}/watchlist`);if(v)return(0,d.jsx)(j.default,{statusCode:500});let x=a.formatMessage(b.query.userId?p.watchlist:p.discoverwatchlist);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.default,{title:[x,b.query.userId?c?.displayName:""]}),(0,d.jsx)("div",{className:"mb-5 mt-1",children:(0,d.jsx)(e.default,{subtext:b.query.userId?(0,d.jsx)(l.default,{href:`/users/${c?.id}`,className:"hover:underline",children:c?.displayName}):"",children:x})}),(0,d.jsx)(f.default,{plexItems:t,isEmpty:q,isLoading:o||r&&(t?.length??0)>0,isReachingEnd:s,onScrollBottom:u,mutateParent:w})]})}]),c()}catch(a){c(a)}},!1),37178,a=>a.a(async(b,c)=>{try{var d=a.i(8171),e=a.i(59424),f=a.i(45736),g=a.i(40882),h=a.i(56668),i=b([e,f,g]);[e,f,g]=i.then?(await i)():i,a.s(["default",0,()=>((0,f.default)([h.Permission.MANAGE_REQUESTS,h.Permission.WATCHLIST_VIEW],{type:"or"}),(0,d.jsx)(e.default,{}))]),c()}catch(a){c(a)}},!1),67199,a=>a.a(async(b,c)=>{try{var d=a.i(85296),e=a.i(31043),f=a.i(52118),g=a.i(17359),h=a.i(68695),i=a.i(37178),j=a.i(47550),k=b([h,i]);[h,i]=k.then?(await k)():k;let l=(0,f.hoist)(i,"default"),m=(0,f.hoist)(i,"getStaticProps"),n=(0,f.hoist)(i,"getStaticPaths"),o=(0,f.hoist)(i,"getServerSideProps"),p=(0,f.hoist)(i,"config"),q=(0,f.hoist)(i,"reportWebVitals"),r=(0,f.hoist)(i,"unstable_getStaticProps"),s=(0,f.hoist)(i,"unstable_getStaticPaths"),t=(0,f.hoist)(i,"unstable_getStaticParams"),u=(0,f.hoist)(i,"unstable_getServerProps"),v=(0,f.hoist)(i,"unstable_getServerSideProps"),w=new d.PagesRouteModule({definition:{kind:e.RouteKind.PAGES,page:"/users/[userId]/watchlist",pathname:"/users/[userId]/watchlist",bundlePath:"",filename:""},distDir:".next",relativeProjectDir:"",components:{App:h.default,Document:g.default},userland:i}),x=(0,j.getHandler)({srcPage:"/users/[userId]/watchlist",config:p,userland:i,routeModule:w,getStaticPaths:n,getStaticProps:m,getServerSideProps:o});a.s(["config",0,p,"default",0,l,"getServerSideProps",0,o,"getStaticPaths",0,n,"getStaticProps",0,m,"handler",0,x,"reportWebVitals",0,q,"routeModule",0,w,"unstable_getServerProps",0,u,"unstable_getServerSideProps",0,v,"unstable_getStaticParams",0,t,"unstable_getStaticPaths",0,s,"unstable_getStaticProps",0,r]),c()}catch(a){c(a)}},!1)];

//# sourceMappingURL=_0ymip3m._.js.map