(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8213],{53948:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return Y},default:function(){return J}});var n=r(2784),i=r(82091),s=r(10805),o=r(97224),a=r(94965),l=r(77552),c=r(7307);const d=c.default.div.withConfig({componentId:"sc-jehdzo-0"})(["align-items:center;display:grid;grid-template-columns:"," auto;grid-template-rows:1fr auto auto;row-gap:",";column-gap:",";margin-bottom:",";padding-bottom:",";border-bottom:1px solid ",";","{grid-template-columns:"," 6fr 1fr 2fr auto;grid-template-rows:auto;}"],(e=>{let{theme:t}=e;return t.image.mobile.xxsmall.width}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.color.lightGray3}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>e.theme.image.desktop.xxsmall.width)),u=(0,c.default)(l.S).attrs({type:"icon"}).withConfig({componentId:"sc-jehdzo-1"})(["grid-column:2 / 3;justify-self:flex-end;width:auto;","{grid-column:auto;order:3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),h=(0,c.default)(l.S).attrs({size:"h3"}).withConfig({componentId:"sc-jehdzo-2"})(["grid-column:1 / 3;","{grid-column:auto;order:2;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet}));var p=r(52322);var m=()=>{const e=new Array(3).fill(null);return(0,p.jsxs)(a.He,{small:!0,children:[e.map(((e,t)=>(0,p.jsxs)(d,{children:[(0,p.jsx)(l.S,{type:"image"}),(0,p.jsx)(l.S,{size:"caption",width:"75%"}),(0,p.jsx)(l.S,{size:"caption"}),(0,p.jsx)(u,{}),(0,p.jsx)(h,{})]},`loading-wishlist-items-${t}`))),(0,p.jsx)(M,{})]})},g=r(19859),f=r(1505),y=r(5719),x=r(4431),j=r(2199);const b=c.default.div.withConfig({componentId:"sc-ayuuc7-0"})(["align-items:center;display:flex;flex-direction:row;gap:",";"],(e=>e.theme.spacing[16])),v=c.default.ul.withConfig({componentId:"sc-ayuuc7-1"})(["list-style:none;margin:0;padding:0;"]),w=c.default.div.withConfig({componentId:"sc-ayuuc7-2"})(["display:flex;justify-content:center;margin:"," 0;"],(e=>{let{theme:t}=e;return t.spacing[32]})),C=c.default.div.withConfig({componentId:"sc-ayuuc7-3"})(["display:flex;justify-content:center;margin-top:0;margin-bottom:1rem;button{width:100%;}","{button{width:auto;}justify-content:flex-end;}","{margin-top:-4rem;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.mediaQuery.desktopLarge}));var k=e=>{let{loading:t,loadMore:r,hasMore:s,removeEntry:o,entries:l}=e;const{text:c}=(0,i.useLocalizer)(),d=(0,i.useMaintenance)(),u=t||s,h=(0,n.useMemo)((()=>l.map((e=>(0,p.jsx)(a._j,{removeEntry:o,entry:e,buttonDisabled:d?.eshop?.active,showWishlistHeart:!0},`${e.category}:${e.id}`)))),[l,o,d?.eshop?.active]);return l.length>0?(0,p.jsxs)(a.He,{small:!0,children:[(0,p.jsx)(C,{children:(0,p.jsx)(D,{entries:l})}),(0,p.jsx)(v,{children:h}),u&&(0,p.jsx)(w,{children:(0,p.jsx)(g.B,{icon:f.Z,isLoading:t,disabled:t,variant:"tertiary",onClick:r,children:c("Load more")})}),(0,p.jsx)(y.S,{size:80})]}):t?(0,p.jsx)(m,{}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.$0,{as:"div",background:e=>e.theme.color.lightGray3,constrained:!0,children:(0,p.jsxs)(b,{children:[(0,p.jsx)(x.Z,{size:64}),(0,p.jsx)(j.H,{variant:"h1",as:"h2",children:c("Nothing's been added to your Wish List yet.")})]})}),(0,p.jsx)(a.$0,{as:"div",constrained:!0,children:(0,p.jsx)(M,{})})]})},L=r(88173),O=r(7797);const I=c.default.div.withConfig({componentId:"sc-s394gk-0"})(["display:flex;flex-direction:column;padding:",";border:1px solid ",";border-radius:",";","{align-items:center;flex-direction:row;}"],(e=>e.theme.spacing[32]),(e=>e.theme.color.primary),(e=>e.theme.spacing[8]),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),E=c.default.div.withConfig({componentId:"sc-s394gk-1"})(["justify-content:center;display:flex;flex-direction:row;gap:",";flex:0 0 auto;margin-top:",";padding:"," 0 0;border-top:1px solid ",";","{align-items:center;margin-top:0;margin-left:",";padding-right:0;padding-bottom:",";padding-left:",";border-top:0;border-left:1px solid ",";}"],(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.color.lightGray2),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.color.lightGray2)),S=(0,c.default)(O.W).withConfig({componentId:"sc-s394gk-2"})(["display:inline-block;",";"],(e=>e.small&&(0,c.css)(["font-size:0.6em;"])));var M=()=>{const{0:e,1:t}=(0,n.useState)(!1),{text:r}=(0,i.useLocalizer)(),s=()=>t(!e);return(0,p.jsxs)(I,{children:[(0,p.jsxs)(L.T,{variant:"body",children:[r("You can save games and other products you like by clicking the")," ",(0,p.jsx)(S,{small:!0,iconOnly:!0,isAdded:e,lang:"en",onClick:s}),"."," ",r("It\u2019s a handy way to keep track of items you\u2019re interested in. We\u2019ll even let you know when one of your Wish List items goes on sale.")]}),(0,p.jsxs)(E,{children:[(0,p.jsx)(L.T,{variant:"title",children:r("Give it a try:")}),(0,p.jsx)(S,{iconOnly:!0,isAdded:e,lang:"en",onClick:s})]})]})},N=r(64897),T=r(30464),P=r(24738),z=r(36796),Z=r(72354),_=r(80963),W=r(13395);const H=c.default.h3.withConfig({componentId:"sc-14hwjov-0"})(["background:",";color:",";padding:",";text-align:center;width:100%;margin:0;"],(e=>{let{theme:t}=e;return t.color.primary}),(e=>{let{theme:t}=e;return t.color.white}),(e=>{let{theme:t}=e;return t.spacing[16]})),$=c.default.div.withConfig({componentId:"sc-14hwjov-1"})(["display:grid;justify-content:center;justify-items:center;align-items:center;grid-gap:1rem;padding:1rem;grid-template-columns:1fr;max-width:500px;p{margin:0;}"]),q=c.default.p.withConfig({componentId:"sc-14hwjov-2"})(["text-align:center;"]),R=(0,c.default)(W.I).withConfig({componentId:"sc-14hwjov-3"})(["input,label{font-weight:300;}"]);var D=e=>{let{entries:t}=e;const r=(0,_.Z)(_.o.TABLET),{text:s}=(0,i.useLocalizer)(),{locale:o}=(0,N.Z)(),a=t?.slice(0,100).map((e=>e.product?.sku||e.id)).join(","),l=new Date,{0:c,1:d}=(0,n.useState)(!1),{0:u,1:h}=(0,n.useState)(!1),{0:m,1:f}=(0,n.useState)("Copy link"),y=(0,z.mt)(o),x=`${`${Z.$e.replace(/\/$/,"")}/${y}`}/wish-list/share/#skus=${a}&date=${Date.parse(l)}`,j=()=>{h(!1),d((e=>!e))};return(0,n.useEffect)((()=>{navigator.share&&!r?f(s("Share")):f(s(u?"Copied!":"Copy"))}),[u,s,r]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(g.B,{icon:T.Z,onClick:j,variant:"tertiary",children:s("Share Wish List")}),(0,p.jsxs)(P.M,{dialogLabel:s("Share Wish List"),visible:c,onClose:j,children:[(0,p.jsx)(H,{children:s("Share Wish List")}),(0,p.jsxs)($,{children:[(0,p.jsx)(T.Z,{size:48}),(0,p.jsx)(q,{children:s("Share a snapshot of your current Wish List with friends and family!")}),(0,p.jsx)(R,{buttonText:m,label:s("Share link"),placeholder:"https://nintendo.com/wish-list/[id's]",value:x,onClick:()=>{navigator.share&&!r?navigator.share({title:s("Check out a snapshot of my Wish List at the My Nintendo Store!"),text:s("Check out a snapshot of my Wish List at the My Nintendo Store!"),url:x}).catch((e=>{console.error("Unable to share",e)})):(h(!0),navigator.clipboard.writeText(x))},disabled:u,readOnly:!0})]})]})]})},A=r(95235);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t{let{type:r,payload:n}=t;if(r===V){if(e.isLoadingMore||e.isRemovingItem){const t=new Set(e.entries.map((e=>{let{category:t,id:r}=e;return`${t}:${r}`}))),r=n.filter((e=>{let{category:r,id:n,product:i}=e;return!t.has(`${r}:${n}`)&&i}));return Q(Q({},e),{},{entries:[...e.entries,...r],isLoadingMore:!1,isRemovingItem:!1})}return Q(Q({},e),{},{entries:[...n]})}return r===G?Q(Q({},e),{},{isLoadingMore:!0}):r===F?Q(Q({},e),{},{isRemovingItem:!0}):void 0},Y=!0;function J(){const{text:e}=(0,i.useLocalizer)(),t=(0,i.useWishlist)({type:i.WishlistType.PAGED_LIST,includeProductInfo:!0}),{0:{entries:r},1:l}=(0,n.useReducer)(U,X),c=(0,n.useMemo)((()=>(t.entries||[]).filter((e=>{let{product:t}=e;return t}))),[t.entries]),d=(0,n.useCallback)((e=>{l({type:F}),t.removeEntry(e)}),[t]),u=(0,n.useCallback)((()=>{l({type:G}),t.loadMoreEntries()}),[t]);(0,n.useEffect)((()=>{l({type:V,payload:c})}),[c]);const h=r.length>0,g=(0,p.jsx)(a.h5,{title:e("Wish List"),description:e("Explore, purchase, or remove items from your Wish List here. You can also share your current list with friends and family."),small:!0,shortDesc:!0,children:(0,p.jsxs)(s.B,{currentPage:"/address-book/",children:[(0,p.jsx)(o.Z,{href:"/",children:(0,p.jsx)("a",{children:e("Home")})}),(0,p.jsx)(o.Z,{href:"/wish-list/",children:(0,p.jsx)("a",{children:e("Wish List")})})]})});return t.loading&&!h?(0,p.jsxs)(a.He,{children:[g,(0,p.jsx)(m,{})]}):(0,p.jsx)(a.Td,{errorMessage:e("Please log in to your Nintendo Account to view your Wish List."),header:g,children:(0,p.jsx)(k,{loading:t.loading,loadMore:u,hasMore:t.hasMoreEntries,entries:r,removeEntry:d})})}},88103:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wish-list",function(){return r(53948)}])},10805:function(e,t,r){"use strict";r.d(t,{B:function(){return p}});var n=r(2784),i=r(13980),s=r.n(i),o=r(51855),a=r(52322),l="KtKAX",c="eIa-f",d="d2PBj";const u=({currentPage:e,children:t})=>{const r=(0,n.useMemo)((()=>n.Children.count(t)-1),[t]),i=(0,n.useMemo)((()=>n.Children.map(t,((t,n)=>{const i=n===r,s=e&&e===t.props.href,l="a"===t.type?t.props.children:"a"===t.props.children.type?t.props.children.props.children:null;return(0,a.jsxs)("li",{className:d,children:[s&&l?(0,a.jsx)("span",{"aria-current":"page",children:l}):t,i?null:(0,a.jsx)(o.Z,{size:10})]},t.props.href||n)}))),[e,t,r]);return(0,a.jsx)("nav",{className:l,"aria-label":"Breadcrumb",children:(0,a.jsx)("ol",{className:c,children:i})})},h=s().shape({props:s().shape({href:s().string.isRequired,children:s().node})});u.propTypes={children:s().oneOfType([s().arrayOf(h),h]).isRequired,currentPage:s().string};var p=u},66012:function(e,t,r){"use strict";r.d(t,{I:function(){return v}});var n=r(2784),i=r(13980),s=r.n(i),o=r(40489),a=r(52322),l="zupv2",c="-qU5Y",d="wmZ7J",u="gn6dZ",h="a6oPm",p="JABWX",m="imR4n",g="zDFQk",f="TL-zQ",y="_0cZc1";const x=n.forwardRef((function(e,t){const{actionElement:r,errorMessage:n,flat:i,hasError:s,label:d,labelHidden:y,onChange:x,placeholder:v,required:w,value:C,className:k,...L}=e,O=`${v}-${d}`;return(0,a.jsxs)("div",{className:(0,o.Z)(l,s&&c,k),children:[(0,a.jsx)("label",{className:(0,o.Z)(m,y&&g),required:w,htmlFor:O,"aria-label":d,children:d}),(0,a.jsxs)("div",{className:f,children:[(0,a.jsx)("input",{className:(0,o.Z)(u,"left"==i&&h,"right"==i&&p),ref:t,name:d,"aria-invalid":s,id:O,placeholder:v,onChange:x,value:C,required:w,...L}),r]}),(0,a.jsx)(j,{children:(0,a.jsx)(b,{role:"alert",children:n})})]})})),j=({children:e})=>(0,a.jsx)("div",{className:y,children:e}),b=({children:e})=>(0,a.jsx)("div",{className:d,role:"alert",children:e});x.defaultProps={placeholder:"placeholder",label:"input label",labelHidden:!1},x.propTypes={className:s().string,actionElement:s().element,errorMessage:s().string,flat:s().oneOf(["left","right"]),hasError:s().bool,label:s().string.isRequired,labelHidden:s().bool,onChange:s().func,placeholder:s().string.isRequired,required:s().bool,value:s().string};var v=x},13395:function(e,t,r){"use strict";r.d(t,{I:function(){return u}});r(2784);var n=r(40489),i=r(13980),s=r.n(i),o=r(52322),a=r(66012),l=r(19859),c="zlZxL";const d=e=>{const{buttonText:t,buttonType:r,disabled:i,loading:s,onClick:d,required:u,variant:h,className:p,...m}=e;return(0,o.jsx)("div",{className:(0,n.Z)(p,c),children:(0,o.jsx)(a.I,{required:u,disabled:i,actionElement:(0,o.jsx)(l.B,{type:r,onClick:d,disabled:i,isLoading:s,buttonWidth:"full",variant:h,children:t}),...m})})};d.defaultProps={buttonText:"Submit",buttonType:"button"},d.propTypes={className:s().string,buttonText:s().string.isRequired,buttonType:s().oneOf(["submit","reset","button"]),disabled:s().bool,errorMessage:s().string,hasError:s().bool,label:s().string.isRequired,labelHidden:s().bool,loading:s().bool,onClick:s().func,placeholder:s().string,required:s().bool,value:s().string,variant:s().oneOf(["primary","secondary","tertiary","quaternary","ghost"])};var u=d},30464:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const o=e=>(0,s.jsx)("svg",{"data-name":"Share",viewBox:"0 0 34 48",fill:e.color,xmlns:"http://www.w3.org/2000/svg",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"ShareIcon",...e,children:(0,s.jsx)("path",{d:"M5.04998 47.15C3.74998 47.15 2.64164 46.6916 1.72498 45.775C0.808309 44.8583 0.349976 43.75 0.349976 42.45V20.2C0.349976 18.9 0.808309 17.7916 1.72498 16.875C2.64164 15.9583 3.74998 15.5 5.04998 15.5H11.6V20.2H5.04998V42.45H28.95V20.2H22.3V15.5H28.95C30.25 15.5 31.3666 15.9583 32.3 16.875C33.2333 17.7916 33.7 18.9 33.7 20.2V42.45C33.7 43.75 33.2333 44.8583 32.3 45.775C31.3666 46.6916 30.25 47.15 28.95 47.15H5.04998ZM14.6 31.95V9.89997L10.2 14.3L6.84998 11L16.95 0.849976L27.05 11L23.7 14.3L19.3 9.89997V31.95H14.6Z",fill:e.color})});o.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},o.defaultProps={color:"currentColor",size:24}}},function(e){e.O(0,[5106,5820,3948,4965,9774,2888,179],(function(){return t=88103,e(e.s=t);var t}));var t=e.O();_N_E=t}]);