\n\t\t\t{isTrueOrZero(score?.home_team_score) &&\n\t\t\tisTrueOrZero(score?.away_team_score) ? (\n\t\t\t\t\n\t\t\t) : (\n\t\t\t\t\n\t\t\t\t\t{params?.horizontal ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t-{' '}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t)}\n\t\t\n\t);\n};\n\nexport { MatchScoreHandler };\n","import { useContext, useEffect, useState } from 'react';\nimport { Loadable } from '@legacyApp/client/components/loader/loadable/loadable';\nimport {\n\tAMERICAN_FOOTBALL_ID,\n\tAUSSIE_RULES_ID,\n\tBADMINTON_ID,\n\tBANDY_ID,\n\tBASEBALL_ID,\n\tBASKETBALL_ID,\n\tBEACH_VOLLEYBALL_ID,\n\tBOXING_ID,\n\tCRICKET_ID,\n\tDARTS_ID,\n\tESPORTS_ID,\n\tFIELD_HOCKEY_ID,\n\tFLOORBALL_ID,\n\tFOOTBALL_ID,\n\tFUTSAL_ID,\n\tHANDBALL_ID,\n\tICE_HOCKEY_ID,\n\tMMA_ID,\n\tNETBALL_ID,\n\tRUGBY_ID,\n\tSNOOKER_ID,\n\tTABLE_TENNIS_ID,\n\tTENNIS_ID,\n\tVOLLEYBALL_ID,\n\tWATERPOLO_ID,\n} from '../constants/sports';\nimport { ScoreContext } from '../context/ScoreContext';\nimport { ScoreRoundsProps } from '../components/Match/MatchScore/types/ScoreRounds';\nimport { ScoreParamsType } from '../types/Match/ScoreParamsType';\n\nconst simpleComponent = Loadable(\n\t{ loader: () => import('../components/Match/MatchScore/types/ScoreSimple') },\n\tundefined,\n\tundefined,\n\ttrue,\n);\n\nconst ScoreComponents = [\n\t{\n\t\tids: [MMA_ID, BOXING_ID],\n\t\tsimple: {\n\t\t\tComponent: () => null,\n\t\t},\n\t\textended: {\n\t\t\tComponent: () => null,\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tFOOTBALL_ID, // overtime with halves and penalties\n\t\t\tHANDBALL_ID, // overtime with halves and penalties\n\t\t\tRUGBY_ID, // overtime with halves (golden point only rugby league, golden point on second half rugby union) and penalties\n\t\t\tFUTSAL_ID, // overtime with halves and penalties\n\t\t\tFIELD_HOCKEY_ID,\n\t\t],\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreHalf'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tBASKETBALL_ID, // overtime 5 min periods until the winner - [1Q, 2Q, 3Q, 4Q, ...overtime]\n\t\t\tAMERICAN_FOOTBALL_ID, // [1Q, 2Q, 3Q, 4Q, overtime]\n\t\t\tAUSSIE_RULES_ID, // [1Q, 2Q, 3Q, 4Q, overtime]\n\t\t\tNETBALL_ID,\n\t\t],\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreRounds'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\troundsCount: 4,\n\t\t\t\troundsLabels: ['1Q', '2Q', '3Q', '4Q'],\n\t\t\t\tisSummary: true,\n\t\t\t} as ScoreRoundsProps,\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tICE_HOCKEY_ID, // 1 overtime (golden point) and penalties - [1st, 2nd, 3rd, overtime, penalty],\n\t\t],\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreRounds'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\troundsCount: 3,\n\t\t\t\troundsLabels: ['1st', '2nd', '3rd'],\n\t\t\t\tisSummary: true,\n\t\t\t} as ScoreRoundsProps,\n\t\t},\n\t},\n\t{\n\t\tids: [ESPORTS_ID],\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport(\n\t\t\t\t\t\t\t'../components/Match/MatchScore/types/ScoreRoundsConditional'\n\t\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\troundsCount: 1,\n\t\t\t\troundsLabels: ['M1', 'M2', 'M3', 'M4', 'M5'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tWATERPOLO_ID, // [1st, 2nd, 3rd, 4th, overtime, penalty]\n\t\t\tFLOORBALL_ID, // [1st, 2nd, 3rd, 4th, overtime, penalty]\n\t\t],\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreRounds'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\troundsCount: 4,\n\t\t\t\troundsLabels: ['1st', '2nd', '3rd', '4th'],\n\t\t\t\tisSummary: true,\n\t\t\t} as ScoreRoundsProps,\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tBASEBALL_ID, // 9 innings that could be extended until the winner - [1, 2, 3, 4, 5, 6, 7, 8, 9]\n\t\t],\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreRounds'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\troundsCount: 9,\n\t\t\t\troundsLabels: [\n\t\t\t\t\t'1st',\n\t\t\t\t\t'2nd',\n\t\t\t\t\t'3rd',\n\t\t\t\t\t'4th',\n\t\t\t\t\t'5th',\n\t\t\t\t\t'6th',\n\t\t\t\t\t'7th',\n\t\t\t\t\t'8th',\n\t\t\t\t\t'9th',\n\t\t\t\t\t'10th',\n\t\t\t\t\t'11th',\n\t\t\t\t\t'12th',\n\t\t\t\t\t'13th',\n\t\t\t\t],\n\t\t\t\tisSummary: true,\n\t\t\t} as ScoreRoundsProps,\n\t\t},\n\t},\n\t{\n\t\tids: [CRICKET_ID, SNOOKER_ID, BANDY_ID, BEACH_VOLLEYBALL_ID, DARTS_ID],\n\t},\n\t{\n\t\tids: [\n\t\t\tTENNIS_ID, // sets with offer and tiebreaks\n\t\t],\n\t\tsimple: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreSimpleSets'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t},\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreSets'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tTABLE_TENNIS_ID, // sets with offer and tiebreaks\n\t\t],\n\t\tsimple: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreSimpleSets'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\tcolumns: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\tid: 'games',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\tid: 'sets',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreSets'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\troundsLabels: ['G1', 'G2', 'G3', 'G4', 'G5'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tids: [\n\t\t\tVOLLEYBALL_ID, // 5 extended sets\n\t\t\tBADMINTON_ID, // 3 extended sets\n\t\t],\n\t\tsimple: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreSimpleSets'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tprops: {\n\t\t\t\tcolumns: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\tid: 'games',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\tid: 'sets',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\textended: {\n\t\t\tComponent: Loadable(\n\t\t\t\t{\n\t\t\t\t\tloader: () =>\n\t\t\t\t\t\timport('../components/Match/MatchScore/types/ScoreSets'),\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t},\n\t},\n] as const;\n\nconst getData = ({\n\tparams,\n\tsportId,\n}: {\n\tparams: ScoreParamsType;\n\tsportId: number;\n}) => {\n\tconst data = ScoreComponents.find((el) =>\n\t\tel.ids.some((el) => el === sportId),\n\t);\n\tconst type = `${params?.extended ? 'extended' : 'simple'}`;\n\t// console.log('useScoreComponent', {\n\t// \ttype,\n\t// \tdata,\n\t// \tsportId,\n\t// \tparams,\n\t// });\n\tif (!data || data[type] === null) {\n\t\treturn null;\n\t}\n\treturn data[type] || { Component: simpleComponent };\n};\n\nexport const useScoreComponent = ({ sportId }: { sportId: number }) => {\n\tconst { params } = useContext(ScoreContext);\n\n\tconst [data, setData] = useState(null);\n\n\tuseEffect(() => {\n\t\tsetData(getData({ params, sportId }));\n\t}, [sportId]);\n\n\treturn {\n\t\tdata,\n\t};\n};\n","import { FunctionComponent, useContext } from 'react';\nimport styled from 'styled-components';\nimport { DeveloperData } from '@common/components/default/DeveloperData/DeveloperData';\nimport { fontSize } from '@legacyApp/client/modules/style/mixins/fontSize';\nimport { useScoreComponent } from '../../../hooks/useScoreComponent';\nimport { SportContext } from '../../../context/SportContext';\nimport { MatchContext } from '../../../context/MatchContext';\n\nconst ScoreWrapper: FunctionComponent = () => {\n\tconst { id } = useContext(SportContext);\n\n\tconst { match } = useContext(MatchContext);\n\n\tconst { data } = useScoreComponent({ sportId: id || match?.sport?.id });\n\n\tconst { Component, props } = data || {};\n\n\t// console.log('ScoreWrapper', {Component, props, id, match});\n\n\treturn (\n\t\t