import { cx } from '../../lib/utils' import { useSheet } from '../sheetContext' import { EFFECTIVE_DATE, type LegalBlock, type LegalLink } from './common' import { PRIVACY } from './privacy' import { TERMS } from './terms' const DOCS = { privacy: PRIVACY, terms: TERMS } as const export type LegalKind = keyof typeof DOCS function Item({ it }: { it: string | LegalLink }) { if (typeof it === 'string') return <>{it} return ( <> {it.text} {it.note && ` · ${it.note}`} ) } function Block({ b }: { b: LegalBlock }) { if (typeof b === 'string') return

{b}

return ( ) } /** 개인정보처리방침·이용약관 본문. 긴 글은 시트 안에서 스크롤된다 */ export function LegalSheet({ kind }: { kind: LegalKind }) { const doc = DOCS[kind] return (

시행일 {EFFECTIVE_DATE}

{doc.intro}

{doc.sections.map((s) => (

{s.title}

{s.blocks.map((b, i) => ( ))}
))}
) } const linkCls = 'cursor-pointer font-extrabold text-(--ink2) underline underline-offset-2' /** 가입 안내 문구: 각 단어를 누르면 해당 시트가 열린다 */ export function LegalConsent({ className }: { className?: string }) { const { open } = useSheet() return (

가입하면{' '} 과{' '} 에 동의하게 됩니다

) } export function LegalLinks({ className }: { className?: string }) { const { open } = useSheet() return (

) }