import { useState } from "react";
import Head from "./Head";
import List from "./List";

function Turns({ user, setIsTurnsDetails, loading }) {
  const [value, setValue] = useState(0);
  const handleChange = (event, newValue) => setValue(newValue);

  return (
    <div className="opacity-page">
      <p className="text-[#3B3B3B] hidden md:flex text-[16px] font-bold">
        تاریخچه نوبت ها
      </p>
      <Head value={value} setValue={setValue} handleChange={handleChange} />
      <List
        user={user}
        loading={loading}
        setIsTurnsDetails={setIsTurnsDetails}
      />
    </div>
  );
}

export default Turns;
