import CircularLoading from "@/app/component/loading/Circular"; import TextLoading from "@/app/component/loading/Text"; import ArrowLeftD from "@/components/icons/ArrowLeftD"; import GreenCalendarTurn from "@/components/icons/GreenCalendarTurn"; import { Button } from "@mui/material"; import Link from "next/link"; import DoctorAvatar from "@/app/component/DoctorAvatar"; function ItemAppointment({ turn, loading, doctorSlug }) { const bookingDisabled = !loading && turn?.active === false; return (
  • نوبت دهی

    {turn?.name}

    تخصص: {turn?.specialties?.map( (item, idx) => `${item.name} ${turn.specialties.length === idx + 1 ? "" : "|"} ` )}

    {bookingDisabled || !turn?.free_turn ? "نوبت‌دهی غیرفعال است" : `اولین نوبت آزاد: ${turn.free_turn}`}

    {bookingDisabled ? ( ) : ( )}
  • ); } export default ItemAppointment;