(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 i=r(2784),n=r(32899),o=r(67512),s=r(97224),a=r(47608),l=r(84433),d=r(7307);const c=d.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)),h=(0,d.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})),u=(0,d.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)(c,{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)(h,{}),(0,p.jsx)(u,{})]},`loading-wishlist-items-${t}`))),(0,p.jsx)($,{})]})},g=r(62989),f=r(1505),y=r(20669),x=r(4431),b=r(54076);const j=d.default.div.withConfig({componentId:"sc-ayuuc7-0"})(["align-items:center;display:flex;flex-direction:row;gap:",";"],(e=>e.theme.spacing[16])),w=d.default.ul.withConfig({componentId:"sc-ayuuc7-1"})(["list-style:none;margin:0;padding:0;"]),v=d.default.div.withConfig({componentId:"sc-ayuuc7-2"})(["display:flex;justify-content:center;margin:"," 0;"],(e=>{let{theme:t}=e;return t.spacing[32]})),C=d.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:o,removeEntry:s,entries:l}=e;const{text:d}=(0,n.i1)(),c=t||o,h=(0,i.useMemo)((()=>l.map((e=>(0,p.jsx)(a._j,{removeEntry:s,entry:e,showWishlistHeart:!0},`${e.category}:${e.id}`)))),[l,s]);return l.length>0?(0,p.jsxs)(a.He,{small:!0,children:[(0,p.jsx)(C,{children:(0,p.jsx)(A,{entries:l})}),(0,p.jsx)(w,{children:h}),c&&(0,p.jsx)(v,{children:(0,p.jsx)(g.B,{icon:f.Z,isLoading:t,disabled:t,variant:"tertiary",onClick:r,children:d("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)(j,{children:[(0,p.jsx)(x.Z,{size:64}),(0,p.jsx)(b.H,{variant:"h1",as:"h2",children:d("Nothing's been added to your Wish List yet.")})]})}),(0,p.jsx)(a.$0,{as:"div",constrained:!0,children:(0,p.jsx)($,{})})]})},I=r(25544),O=r(9069);const E=d.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})),L=d.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,d.default)(O.W).withConfig({componentId:"sc-s394gk-2"})(["display:inline-block;",";"],(e=>e.small&&(0,d.css)(["font-size:0.6em;"])));var $=()=>{const{0:e,1:t}=(0,i.useState)(!1),{text:r}=(0,n.i1)(),o=()=>t(!e);return(0,p.jsxs)(E,{children:[(0,p.jsxs)(I.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:o}),"."," ",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)(L,{children:[(0,p.jsx)(I.T,{variant:"title",children:r("Give it a try:")}),(0,p.jsx)(S,{iconOnly:!0,isAdded:e,lang:"en",onClick:o})]})]})},M=r(64897),T=r(30464),H=r(31145),z=r(79185),q=r(72354),P=r(80963),N=r(53402);const _=d.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]})),W=d.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;}"]),R=d.default.p.withConfig({componentId:"sc-14hwjov-2"})(["text-align:center;"]),Z=(0,d.default)(N.I).withConfig({componentId:"sc-14hwjov-3"})(["input,label{font-weight:300;}"]);var A=e=>{let{entries:t}=e;const r=(0,P.Z)(P.o.TABLET),{text:o}=(0,n.i1)(),{locale:s}=(0,M.Z)(),a=t?.slice(0,100).map((e=>e.product?.sku||e.id)).join(","),l=new Date,{0:d,1:c}=(0,i.useState)(!1),{0:h,1:u}=(0,i.useState)(!1),{0:m,1:f}=(0,i.useState)("Copy link"),y=(0,z.mt)(s),x=`${`${q.$e.replace(/\/$/,"")}/${y}`}/wish-list/share/#skus=${a}&date=${Date.parse(l)}`,b=()=>{u(!1),c((e=>!e))};return(0,i.useEffect)((()=>{navigator.share&&!r?f(o("Share")):f(o(h?"Copied!":"Copy"))}),[h,o,r]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(g.B,{icon:T.Z,onClick:b,variant:"tertiary",children:o("Share Wish List")}),(0,p.jsxs)(H.M,{dialogLabel:o("Share Wish List"),visible:d,onClose:b,children:[(0,p.jsx)(_,{children:o("Share Wish List")}),(0,p.jsxs)(W,{children:[(0,p.jsx)(T.Z,{size:48}),(0,p.jsx)(R,{children:o("Share a snapshot of your current Wish List with friends and family!")}),(0,p.jsx)(Z,{buttonText:m,label:o("Share link"),placeholder:"https://nintendo.com/wish-list/[id's]",value:x,onClick:()=>{navigator.share&&!r?navigator.share({title:o("Check out a snapshot of my Wish List at the My Nintendo Store!"),text:o("Check out a snapshot of my Wish List at the My Nintendo Store!"),url:x}).catch((e=>{console.error("Unable to share",e)})):(u(!0),navigator.clipboard.writeText(x))},disabled:h,readOnly:!0})]})]})]})},D=r(95235);function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function Q(e){for(var t=1;t{let{type:r,payload:i}=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=i.filter((e=>{let{category:r,id:i,product:n}=e;return!t.has(`${r}:${i}`)&&n}));return Q(Q({},e),{},{entries:[...e.entries,...r],isLoadingMore:!1,isRemovingItem:!1})}return Q(Q({},e),{},{entries:[...i]})}return r===B?Q(Q({},e),{},{isLoadingMore:!0}):r===F?Q(Q({},e),{},{isRemovingItem:!0}):void 0},Y=!0;function J(){const{text:e}=(0,n.i1)(),t=(0,n.Ei)({type:n.AH.PAGED_LIST,includeProductInfo:!0}),{0:{entries:r},1:l}=(0,i.useReducer)(X,U),d=(0,i.useMemo)((()=>(t.entries||[]).filter((e=>{let{product:t}=e;return t}))),[t.entries]),c=(0,i.useCallback)((e=>{l({type:F}),t.removeEntry(e)}),[t]),h=(0,i.useCallback)((()=>{l({type:B}),t.loadMoreEntries()}),[t]);(0,i.useEffect)((()=>{l({type:V,payload:d})}),[d]);const u=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)(o.B,{currentPage:"/address-book/",children:[(0,p.jsx)(s.Z,{href:"/",children:(0,p.jsx)("a",{children:e("Home")})}),(0,p.jsx)(s.Z,{href:"/wish-list/",children:(0,p.jsx)("a",{children:e("Wish List")})})]})});return t.loading&&!u?(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:h,hasMore:t.hasMoreEntries,entries:r,removeEntry:c})})}},88103:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wish-list",function(){return r(53948)}])},67512:function(e,t,r){"use strict";r.d(t,{B:function(){return g}});var i=r(2784),n=r(13980),o=r.n(n),s=r(7307),a=r(51855),l=r(52322);const d=s.default.nav.withConfig({componentId:"sc-sjz6t7-0"})(["font-size:",";font-weight:",";"],(({theme:e})=>e.font.size.legalDesktop),(({theme:e})=>e.font.weight.bold)),c=s.default.ol.withConfig({componentId:"sc-sjz6t7-1"})(["align-items:center;display:flex;flex-direction:row;list-style:none;margin:0;padding:0;font-size:inherit;font-weight:inherit;flex-wrap:nowrap;"]),h=s.default.li.withConfig({componentId:"sc-sjz6t7-2"})(["align-items:center;display:inline-flex;margin-right:",";color:",";white-space:nowrap;",""],(({theme:e})=>e.spacing[8]),(({theme:e,$isActive:t})=>t?e.color.darkGray2:e.color.darkGray3),(({$cutOff:e})=>e&&(0,s.css)(["overflow:hidden;& > *{","}"],(({$cutOff:e})=>e&&(0,s.css)(["overflow:hidden;text-overflow:ellipsis;"]))))),u=(0,s.default)(a.Z).attrs((({theme:e})=>({size:10,color:e.color.lightGray2}))).withConfig({componentId:"sc-sjz6t7-3"})(["margin-left:",";"],(({theme:e})=>e.spacing[8])),p=({currentPage:e,children:t})=>{const r=(0,i.useMemo)((()=>i.Children.count(t)-1),[t]),n=(0,i.useMemo)((()=>i.Children.map(t,((t,i)=>{const n=i===r,o=e&&e===t.props.href,s="a"===t.type?t.props.children:"a"===t.props.children.type?t.props.children.props.children:null;return(0,l.jsxs)(h,{$isActive:o,$cutOff:n,children:[o&&s?(0,l.jsx)("span",{"aria-current":"page",children:s}):t,n?null:(0,l.jsx)(u,{})]},t.props.href||i)}))),[e,t,r]);return(0,l.jsx)(d,{"aria-label":"Breadcrumb",children:(0,l.jsx)(c,{children:n})})},m=o().shape({props:o().shape({href:o().string.isRequired,children:o().node})});p.propTypes={children:o().oneOfType([o().arrayOf(m),m]).isRequired,currentPage:o().string};var g=p},80437:function(e,t,r){"use strict";r.d(t,{I:function(){return m},a:function(){return c}});var i=r(2784),n=r(13980),o=r.n(n),s=r(7307),a=r(88582),l=r(52322);const d=s.default.div.withConfig({componentId:"sc-1jq32sv-0"})(["width:100%;position:relative;z-index:0;",";"],a.e),c=s.default.input.withConfig({componentId:"sc-1jq32sv-1"})(["width:100%;background-color:",";border:1px solid ",";border-radius:",";padding-left:",";",";",";",";&[disabled]{","}&::placeholder{",";}&.left{border-top-left-radius:0;border-bottom-left-radius:0;}&.right{border-top-right-radius:0;border-bottom-right-radius:0;}&:focus[data-focus-visible-added],&:focus-visible{","}"],(({theme:e})=>e.color.white),(({theme:e})=>e.color.darkGray4),(({theme:e})=>e.borderRadius),(({theme:e})=>e.spacing[24]),a.i,a.a,(({$hasError:e})=>e&&a.b),a.d,a.p,a.f),h=s.default.label.withConfig({componentId:"sc-1jq32sv-2"})(["display:block;white-space:nowrap;"," margin-bottom:",";"," ",""],a.l,(({$isHidden:e})=>e?"0":a.c),(({$isHidden:e})=>!!e&&"\n display: none;\n\n & + input {\n margin-top: 0;\n }\n "),(({required:e})=>e&&(0,s.css)(["&::after{content:' *';}"]))),u=s.default.div.withConfig({componentId:"sc-1jq32sv-3"})(["display:flex;"]),p=i.forwardRef((function(e,t){const{actionElement:r,errorMessage:i,flat:n,hasError:o,label:s,labelHidden:p,onChange:m,placeholder:g,required:f,value:y,className:x,...b}=e,j=`${g}-${s}`;return(0,l.jsxs)(d,{$hasError:o,className:x,children:[(0,l.jsx)(h,{required:f,$isHidden:p,htmlFor:j,"aria-label":s,children:s}),(0,l.jsxs)(u,{children:[(0,l.jsx)(c,{ref:t,name:s,$hasError:o,"aria-invalid":o,id:j,className:n,placeholder:g,onChange:m,$isLabelHidden:p,value:y,required:f,...b}),r]}),(0,l.jsx)(a.S,{children:(0,l.jsx)(a.g,{role:"alert",children:i})})]})}));p.defaultProps={placeholder:"placeholder",label:"input label",labelHidden:!1},p.propTypes={className:o().string,actionElement:o().element,errorMessage:o().string,flat:o().oneOf(["left","right"]),hasError:o().bool,label:o().string.isRequired,labelHidden:o().bool,onChange:o().func,placeholder:o().string.isRequired,required:o().bool,value:o().string};var m=p},53402:function(e,t,r){"use strict";r.d(t,{I:function(){return h}});r(2784);var i=r(13980),n=r.n(i),o=r(7307),s=r(62989),a=r(80437),l=r(52322);const d=o.default.div.withConfig({componentId:"sc-1akvqcq-0"})(["display:flex;width:100%;","{flex:1;margin-right:",";}","{width:unset;height:3rem;}","{","{height:4rem;}}","{","{margin-right:",";}}"],a.a,(({theme:e})=>e.spacing[8]),s.b,(({theme:e})=>e.mediaQuery.tabletSmall),s.b,(({theme:e})=>e.mediaQuery.desktop),a.a,(({theme:e})=>e.spacing[12])),c=e=>{const{buttonText:t,buttonType:r,disabled:i,loading:n,onClick:o,required:c,variant:h,className:u,...p}=e;return(0,l.jsx)(d,{className:u,children:(0,l.jsx)(a.I,{required:c,disabled:i,actionElement:(0,l.jsx)(s.B,{type:r,onClick:o,disabled:i,isLoading:n,buttonWidth:"full",variant:h,children:t}),...p})})};c.defaultProps={buttonText:"Submit",buttonType:"button"},c.propTypes={className:n().string,buttonText:n().string.isRequired,buttonType:n().oneOf(["submit","reset","button"]),disabled:n().bool,errorMessage:n().string,hasError:n().bool,label:n().string.isRequired,labelHidden:n().bool,loading:n().bool,onClick:n().func,placeholder:n().string,required:n().bool,value:n().string,variant:n().oneOf(["primary","secondary","tertiary","quaternary","ghost"])};var h=c},30464:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});r(2784);var i=r(13980),n=r.n(i),o=r(52322);const s=e=>(0,o.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,o.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})});s.propTypes={className:n().string,color:n().string,size:n().oneOfType([n().number,n().string])},s.defaultProps={color:"currentColor",size:24}}},function(e){e.O(0,[3904,2122,7608,9774,2888,179],(function(){return t=88103,e(e.s=t);var t}));var t=e.O();_N_E=t}]);