import {PlaceCategory} from '@o2o/shared'; import {useSite} from '@site/lib/site-context'; import {bookingActionLabel, bookingLinks, stayBookingView} from '@site/lib/derive'; import {BOOK_EVENT} from '../paper/Rooms'; import {Fire} from './Art'; export function Booking() { const payload = useSite(); const links = bookingLinks(payload); const stay = payload.place.category === PlaceCategory.LODGING ? stayBookingView(payload) : null; const phone = payload.place.phone; const book = () => window.dispatchEvent(new Event(BOOK_EVENT)); const box = (full: boolean) => (

이용안내 및 예약

요금과 예약 방법을 안내합니다.

{stay && ( )} {(full ? links : links.slice(0, 1)).map((link) => ( {bookingActionLabel(link)} ))} {full && phone && ( {phone} )} {!full && ( 이용안내 보기 )}
); return ( <>
{box(false)}
{box(true)}
); }