'use client';

import { SECTION_ORDER } from '../sectionConfig';

interface ProgressBarProps {
  currentSlug: string;
}

export default function ProgressBar({ currentSlug }: ProgressBarProps) {
  const currentIndex = SECTION_ORDER.indexOf(currentSlug);
  const total = SECTION_ORDER.length;
  const progress = total > 0 ? ((currentIndex + 1) / total) * 100 : 0;

  return (
    <div className="progress-bar-container">
      <div className="progress-bar-fill" style={{ width: `${progress}%` }} />
    </div>
  );
}
