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

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

function Title() {

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

    return (
        <div className="flex items-center justify-start gap-4">
            {listTitle.map((name, idx) => (
                <ItemTitle
                    setActiveBtn={setActiveBtn}
                    activeBtn={activeBtn}
                    name={name}
                    idx={idx}
                    key={idx}
                />
            ))}
        </div>
    )
}

export default Title