{"version":3,"file":"static/js/2392.afbf74fa.chunk.js","mappings":"kIASO,MAAMA,EACXC,IACE,MAAM,SAAEC,GAA0BC,EAAAA,EAAMC,WAAWC,SAASC,KAE5D,OAAOL,EAAgBM,QACrB,CAACC,EAAOC,IACNA,EAAKC,eACD,IACKF,EACH,IACKC,EACHE,sBAAuBF,EAAKE,sBACxBF,EAAKE,sBAAsBC,MACzBC,GAAUA,EAAOC,WAAaZ,IAEhC,KACJQ,eAAgBD,EAAKC,iBAGzBF,GACN,GACD,C","sources":["newelements/_Betslip/managers/ProfitBoostManager/utils/buildProfitBoostDataFromFreeBetResponse.ts"],"sourcesContent":["import { ProfileData } from 'interfaces/authentication';\nimport { TProfitBoostItem } from 'interfaces/bet-data';\nimport type { TCheckProfitBoostPayload } from 'newelements/_Betslip/managers/ProfitBoostManager/actions';\nimport store from 'store';\n\ntype TBuildProfitBoostDataFromFreeBetResponse = (\n  data: TCheckProfitBoostPayload['data']\n) => TProfitBoostItem[];\n\nexport const buildProfitBoostDataFromFreeBetResponse: TBuildProfitBoostDataFromFreeBetResponse =\n  freeBetResponse => {\n    const { currency }: ProfileData = store.getState().userData.user;\n\n    return freeBetResponse.reduce<TProfitBoostItem[]>(\n      (items, item) =>\n        item.amount_percent\n          ? [\n              ...items,\n              {\n                ...item,\n                boost_max_bet_amounts: item.boost_max_bet_amounts\n                  ? item.boost_max_bet_amounts.find(\n                      amount => amount.Currency === currency\n                    )\n                  : null,\n                amount_percent: item.amount_percent\n              }\n            ]\n          : items,\n      []\n    );\n  };\n"],"names":["buildProfitBoostDataFromFreeBetResponse","freeBetResponse","currency","store","getState","userData","user","reduce","items","item","amount_percent","boost_max_bet_amounts","find","amount","Currency"],"sourceRoot":""}