"use client";
import { useState } from "react";
import ItemTitle from "./ItemTitle";

const listTitle = ["سلامت روان", "پوست و مو", "کودک و نوجوان", "دارو", "تغذیه"];

function Title() {
  const [activeBtn, setActiveBtn] = useState(0);

  return (
    <ul className="flex w-full overflow-auto hidden-scroll items-center justify-start gap-[8px] sm:gap-[10px] md:gap-[13px] lg:gap-[16px]">
      {listTitle.map((name, idx) => (
        <ItemTitle
          setActiveBtn={setActiveBtn}
          activeBtn={activeBtn}
          name={name}
          idx={idx}
          key={idx}
        />
      ))}
    </ul>
  );
}

export default Title;
