{"version":3,"file":"TabNavigation.js","sources":["../../scripts/tabNavigation/TabNavigation.tsx"],"sourcesContent":["import * as React from 'react'\r\nimport { useEffect, useState } from 'react'\r\nimport { animationFadeInUp } from '../constants'\r\nimport { ITabItems, ITabNavigationContent } from '../models'\r\nimport TabComponent from '../sharedComponents/TabComponent'\r\n\r\nfunction TabNavigation({ content }: { content: ITabNavigationContent }) {\r\n const [items, setItems] = useState([] as ITabItems[])\r\n const [activeTab, setActiveTab] = useState('')\r\n\r\n useEffect(() => {\r\n setItems(content.TabItems)\r\n itemFilter(content.TabItems[0].Heading)\r\n }, [])\r\n\r\n const itemFilter = (filter: string) => {\r\n setItems(content.TabItems.filter((item) => item.Heading === filter))\r\n setActiveTab(filter)\r\n }\r\n\r\n const resetFilter = () => {\r\n itemFilter(content.TabItems[0].Heading)\r\n }\r\n\r\n useEffect(() => {\r\n window.animationRefresh()\r\n }, [items])\r\n\r\n return (\r\n
\r\n
\r\n

{content.Heading}

\r\n
\r\n
\r\n item.Heading)}\r\n activeTab={activeTab}\r\n resetFilter={resetFilter}\r\n onFilter={itemFilter}\r\n />\r\n
\r\n
\r\n {items.length > 0 &&\r\n items.map((item) => (\r\n \r\n \r\n \r\n {item.Heading}\r\n \r\n \r\n {item.Links.map((link, index) => (\r\n \r\n
\r\n \r\n {link.Title}\r\n \r\n
\r\n \r\n ))}\r\n
\r\n
\r\n ))}\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default TabNavigation\r\n"],"names":["TabNavigation","content","items","setItems","useState","activeTab","setActiveTab","useEffect","itemFilter","filter","item","resetFilter","jsxs","animationFadeInUp","jsx","TabComponent","_a","_b","link","index"],"mappings":"iIAMA,SAASA,EAAc,CAAE,QAAAC,GAA+C,CACtE,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAA,SAAS,CAAiB,CAAA,EAC9C,CAACC,EAAWC,CAAY,EAAIF,WAAS,EAAE,EAE7CG,EAAAA,UAAU,IAAM,CACdJ,EAASF,EAAQ,Q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