import { ReactElement } from 'react';

import './WindowTabList.less';

import { Tab } from '../../store/windowsSlice';
import 'date-fns';
import { NormalizedUrl } from '../../chrome/normalizeUrl';
import WindowGroupHeader from '../components/WindowGroupHeader';

interface WindowRowProps {
  accessTime: number;
  tabs: Tab[];
  urls: NormalizedUrl[];
}

const WindowTabListHeader = ({ accessTime, tabs, urls }: WindowRowProps): ReactElement => {
  return (
    <WindowGroupHeader
        urls={urls.map(u => u.normalized)}
        tabs={tabs}
        accessTime={accessTime}
        // title default handles page count
    />
  );
};

export default WindowTabListHeader;
