'use client';

import TimelineWithSlider from '@/components/timeline/TimelineWithSlider';

import { CreationListItem } from '@/types/Creation';

// import StickyCategoryHeader from "@/components/StickyCategoryHeader";
// import { usePathname } from "@/i18n/navigation";

interface CreationListClientProps {
  title?: string; // todo remove completely
  creations: CreationListItem[];
  min: number;
  max: number;
  initialYear: number;
  availableYears: number[];
  showCreatorProfession?: boolean;
}

const CreationListClient: React.FC<CreationListClientProps> = ({
  // title,
  creations,
  min,
  max,
  initialYear,
  availableYears,
  showCreatorProfession,
}) => {
  // const pathname = usePathname();

  // // pathnames are same for en and hu, so we can use them directly
  // const urlsWithMapToggle = [
  //   "/alkotasok/epitomuveszet",
  //   "/alkotasok/fotomuveszet",
  //   "/alkotasok/iparmuveszet",
  //   "/alkotasok/kepzomuveszet",
  //   "/alkotasok/szinhazmuveszet",
  //   "/alkotasok/zenemuveszet",
  // ];

  // const shouldShowMapToggle = urlsWithMapToggle.some((url) =>
  //   pathname.includes(url)
  // );

  return (
    <div className="flex-1 w-full pb-page flex flex-col px-site-timeline">
      {/* <StickyCategoryHeader title={title} showMapToggle={shouldShowMapToggle} /> */}

      <TimelineWithSlider
        data={creations}
        min={min}
        max={max}
        initialYear={initialYear}
        availableYears={availableYears}
        showCreatorProfession={showCreatorProfession}
      />
    </div>
  );
};

export default CreationListClient;
