import React from 'react'
import { ariaSelected } from '../../utils'
import { THeaderProps } from '../../interfaces'
import { TNavMenuItem } from '@financial-times/dotcom-types-navigation'
import SubNavWithDropdown from './SubNavWithDropdown'
const SubNavigation = (props: THeaderProps) => (
)
const SubNavigationWrapper = (props) => (
{/* Implements subNavigation scrolling at smaller viewports */}
)
const BreadCrumb = ({ items }: { items?: TNavMenuItem[] }) => (
{items?.map((item, index) => {
const selected = item.selected ? 'o-header__subnav-link--highlight' : ''
return (
-
{item.label}
)
})}
)
const SubSections = ({ items, rightAlignment }: { items?: TNavMenuItem[]; rightAlignment?: boolean }) => {
if (!items || items.length === 0) {
return null
}
return (
{items.map((item, index) => {
const selected = item.selected ? 'o-header__subnav-link--highlight' : ''
return (
-
{item.isSubnavDropdownEnabled &&
item.subnavDropdownOptions &&
item.subnavDropdownOptions.length > 0 ? (
) : (
{item.label}
)}
)
})}
)
}
export { SubNavigation }