{"version":3,"file":"static/js/ProfitBoostManagerSliceMultiple.a795c106.chunk.js","mappings":"uNAQO,MAAMA,EAAsCA,MACjDC,EAAAA,EAAAA,GAAY,CACV,CAACC,EAAAA,GAAoBC,oBAAqBC,IAInC,IAJoC,QACzCC,GAGDD,ECJHE,KACE,MAAMC,GAAmBC,EAAAA,EAAAA,GAAwCF,GAE7DC,EAAiBE,QACnBC,EAAAA,EAAMC,UAASC,EAAAA,EAAAA,KAA4BL,GAC7C,EDAEM,CAAsCR,EAAQC,KAAK,IAIhD,K","sources":["newelements/_Betslip/managers/ProfitBoostManager/BetTypeBaseSlice/multiple.tsx","newelements/_Betslip/managers/ProfitBoostManager/utils/checkProfitBoostActionHandler/multiple.ts"],"sourcesContent":["import { FC } from 'react';\nimport {\n  EProfitBoostActions,\n  TCheckProfitBoostPayload\n} from 'newelements/_Betslip/managers/ProfitBoostManager/actions';\nimport { checkMultipleProfitBoostActionHandler } from 'newelements/_Betslip/managers/ProfitBoostManager/utils/checkProfitBoostActionHandler/multiple';\nimport { useEventbus } from 'newhooks/generic/useEventbus';\n\nexport const ProfitBoostManagerSliceMultiple: FC = () => {\n  useEventbus({\n    [EProfitBoostActions.CHECK_PROFIT_BOOST]: ({\n      payload\n    }: {\n      payload: TCheckProfitBoostPayload;\n    }) => {\n      checkMultipleProfitBoostActionHandler(payload.data);\n    }\n  });\n\n  return null;\n};\n","import type { TCheckProfitBoostPayload } from 'newelements/_Betslip/managers/ProfitBoostManager/actions';\nimport { buildProfitBoostDataFromFreeBetResponse } from 'newelements/_Betslip/managers/ProfitBoostManager/utils/buildProfitBoostDataFromFreeBetResponse';\nimport store from 'store';\nimport { setMultipleProfitBoostItems } from 'store/actions';\n\ntype TCheckMultipleProfitBoostActionHandler = (\n  data: TCheckProfitBoostPayload['data']\n) => void;\n\nexport const checkMultipleProfitBoostActionHandler: TCheckMultipleProfitBoostActionHandler =\n  data => {\n    const profitBoostItems = buildProfitBoostDataFromFreeBetResponse(data);\n\n    if (profitBoostItems.length) {\n      store.dispatch(setMultipleProfitBoostItems(profitBoostItems));\n    }\n  };\n"],"names":["ProfitBoostManagerSliceMultiple","useEventbus","EProfitBoostActions","CHECK_PROFIT_BOOST","_ref","payload","data","profitBoostItems","buildProfitBoostDataFromFreeBetResponse","length","store","dispatch","setMultipleProfitBoostItems","checkMultipleProfitBoostActionHandler"],"sourceRoot":""}