"use client";

import { useState } from "react";

import DashboardPage from "@/components/dashboard";
import UserAccountPage from "./userAccount";

function Content({ matchedCity, params, logged, user }) {
  const [value, setValue] = useState(Number(params?.sidebar) || 0);
  const [isOpenSide, setIsOpenSide] = useState();
  const [isTurnsDetails, setIsTurnsDetails] = useState(null);

  return (
    <DashboardPage
      value={value}
      logged={logged}
      setValue={setValue}
      user={user}
      isOpenSide={isOpenSide}
      matchedCity={matchedCity}
      setIsOpenSide={setIsOpenSide}
      isTurnsDetails={isTurnsDetails}
      setIsTurnsDetails={setIsTurnsDetails}
    >
      <UserAccountPage
        value={value}
        user={user}
        setIsOpenSide={setIsOpenSide}
        isTurnsDetails={isTurnsDetails}
        setIsTurnsDetails={setIsTurnsDetails}
      />
    </DashboardPage>
  );
}

export default Content;
