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"; import { bookingState } from "./bookingState"; function ItemAppointment({ turn, loading, doctorSlug, booking }) { const state = booking ?? bookingState(turn, []); const bookingDisabled = !loading && !state.enabled; return (
نوبت دهی
{turn?.name}
تخصص: {turn?.specialties?.map( (item, idx) => `${item.name} ${turn.specialties.length === idx + 1 ? "" : "|"} ` )}
{state.label}