import {ChevronDown, Phone} from 'lucide-react'; import {useSite} from '@/lib/site-context'; import {sectionName, unitSpec, unitViews} from '@/lib/derive'; /** * 객실 · 메뉴 · 프로그램 — 업종에 따라 이름만 달라진다. * * ★ 예전에는 카드가 상세 **페이지**로 넘어갔다. 사이트를 한 장으로 합치면서 * 그 페이지의 내용(이용 정보 표 · 사진 전체 · 전화 문의)을 카드 안으로 들여왔다. * 빼고 합쳤으면 확인된 fact 가 화면에서 사라지고, JSON-LD 에는 남아 있어 * 발행 게이트(화면 ↔ 구조화 데이터 대조)에 걸린다. * * ★ 펼침은
다. 자바스크립트 없이 동작하고, 크롤러는 접힌 내용도 읽는다 — * 조건부 렌더로 감추면 HTML 에 아예 없어서 AI 가 못 본다. */ export function UnitsSection() { const payload = useSite(); const spec = unitSpec(payload); const units = unitViews(payload); if (units.length === 0) return null; return (

{spec.label}

{/* 섹션 id 는 업종마다 다르다(rooms · menu · programs) — spec.path 가 그 id 다. 사장님이 이름을 안 바꿨으면 지금까지 쓰던 "객실 3개 안내" 꼴로 떨어진다. */}

{sectionName(payload, spec.path, `${spec.label} ${units.length}개 안내`)}

    {units.map((unit) => (
  • {unit.images[0] && (
    {unit.images[0].alt} {unit.priceText && ( {unit.priceText} )}
    )}

    {unit.name}

    {unit.chips.length > 0 && (
      {unit.chips.map((chip) => (
    • {chip.label} {chip.value}
    • ))}
    )} {unit.intro && (

    {unit.intro}

    )}
    {(unit.rows.length > 0 || unit.images.length > 1) && (
    {unit.name} 자세히
    {unit.rows.length > 0 && (
    {unit.rows.map((row) => (
    {row.label}
    {row.value}
    ))}
    )} {unit.images.length > 1 && (
      {unit.images.slice(1).map((image) => (
    • {image.alt}
    • ))}
    )} {payload.place.phone && ( {payload.place.phone} 문의 )}
    )}
  • ))}
); }