package space.nstart.pcp.slots_service.service

import org.springframework.stereotype.Service
import space.nstart.pcp.slots_service.entity.BookedSlotEntity
import java.time.LocalDateTime

interface BookedSlotTimeResolver {
    fun resolveBookedSlotStartTime(bookedSlot: BookedSlotEntity): LocalDateTime?
}

@Service
class SatelliteBookedSlotTimeResolver(
    private val slotService: SlotService
) : BookedSlotTimeResolver {
    override fun resolveBookedSlotStartTime(bookedSlot: BookedSlotEntity): LocalDateTime? =
        slotService.resolveBookedSlotStartTime(bookedSlot)
}
