Build 571251stable
Module 544441
918 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>f});var i=n(64700),r=n(202163),s=n(989441),a=n(802516),o=n(49381),l=n(778591),u=n(853022),c=n(375708);let d={[s.D.XBOX_GAME_PASS]:{distributor:s.D.XBOX_GAME_PASS,getLabel:()=>c.intl.string(c.t["s7+3um"]),getStoreName:()=>c.intl.string(c.t["QpN/Iz"]),icon:a.Y,getStoreUrl:u.jA,analyticsAction:"PRESS_PLAY_WITH_XBOX_GAME_PASS_BUTTON"},[s.D.STEAM]:{distributor:s.D.STEAM,getLabel:()=>c.intl.string(c.t.L1N2gh),getStoreName:()=>c.intl.string(c.t.FsANs4),icon:o.N,getStoreUrl:l.Z,analyticsAction:"PRESS_PLAY_ON_STEAM_BUTTON"}},_=[s.D.XBOX_GAME_PASS,s.D.STEAM],h=[];function f(e){let{gameRecord:t}=(0,r.A)(e);return(0,i.useMemo)(()=>{if(null==t)return h;let e=new Set(_),n=new Map;for(let i of t.thirdPartySkus){let t=i.distributor;null!=i.id&&e.has(t)&&!n.has(t)&&n.set(t,i.id)}return _.flatMap(e=>{let t=n.get(e),i=d[e];return null==t||null==i?[]:[{ctaConfig:i,skuId:t}]})},[t])}}