import { BOOKING_DOCTORS } from '../../data/mockData';
import { Card, CardContent, CardHeader } from '../ui';
import { BookingModal } from './BookingModal';
import { cls } from '../../utils/cls';
interface BookingSectionProps {
selectedDay: number;
onSelectDay: (day: number) => void;
bookingDoctor: (typeof BOOKING_DOCTORS)[number] | null;
onSelectDoctor: (doctor: (typeof BOOKING_DOCTORS)[number]) => void;
onCloseModal: () => void;
}
export const BookingSection = ({
selectedDay,
onSelectDay,
bookingDoctor,
onSelectDoctor,
onCloseModal,
}: BookingSectionProps) => (
预约日历
{Array.from({ length: 30 }, (_, i) => i + 1).map((day) => (
))}
当日预约数
{BOOKING_DOCTORS.length}
预约医生 · {selectedDay} 日
{BOOKING_DOCTORS.map((doctor) => {
const ratio = doctor.total ? (doctor.total - doctor.remain) / doctor.total : 0;
const percent = Math.round(Math.max(0, Math.min(1, ratio)) * 100);
return (
);
})}
{bookingDoctor &&
}
);