Build 573682stable
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),d=n(375708);let c={[s.D.XBOX_GAME_PASS]:{distributor:s.D.XBOX_GAME_PASS,getLabel:()=>d.intl.string(d.t["s7+3um"]),getStoreName:()=>d.intl.string(d.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:()=>d.intl.string(d.t.L1N2gh),getStoreName:()=>d.intl.string(d.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=c[e];return null==t||null==i?[]:[{ctaConfig:i,skuId:t}]})},[t])}}