{"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