1import type { AlgoliaItemHierarchy, AlgoliaItemType } from '../types';
2import { getHighlightHTML } from '../utils';
3import { FootnoteArrowIcon } from './icons';
4
5export const FootnoteSection = ({
6  item,
7  levelKey = 'lvl0',
8}: {
9  item: AlgoliaItemType;
10  levelKey: keyof AlgoliaItemHierarchy<string>;
11}) =>
12  item.hierarchy[levelKey] ? (
13    <>
14      <FootnoteArrowIcon />
15      <span {...getHighlightHTML(item, levelKey)} />
16    </>
17  ) : null;
18