import { useState } from "react"; interface MessagePreviewProps { title: string; body: string; hasImage: boolean; appName?: string; variant?: "large" | "small"; } // 폰 배경 이미지 (밝은 그래디언트 배경) const PHONE_BG = "https://lh3.googleusercontent.com/aida-public/AB6AXuDmbD5msJ9uegWOcy0256wH6JsipGzrgtab3foEKiGVs_a4SbUCTPti6BVDJOQEP4ZCvbcAw9hI3C7QuUdPxrBf3jJm3VgKkWoqSzl--ZEbPIzimbYnM1HQEsRbil7nmWG_XscwPP30V3OFnyleVY_R7Urk0UYbrL8P1OJwW1xwYfBDJv4htBuICd9GR2NIJlSShaBxfF9Kgp59Cte3VapdHxCz9p2Cb9tf1t13xc2LV348V-kfyQNtL8XCZNP3LMrrUIR4SrV3cGM"; export default function MessagePreview({ title, body, hasImage, appName = "SPMS", variant = "large", }: MessagePreviewProps) { const [tab, setTab] = useState<"ios" | "android">("ios"); const isLarge = variant === "large"; const phoneWidth = isLarge ? "w-[300px]" : "w-[240px]"; const truncatedBody = body.length > 50 ? body.substring(0, 50) + "..." : body; return (
{/* 탭 */}
{/* iOS 프리뷰 */} {tab === "ios" && (
{/* Banner Notification */}

Banner Notification

shopping_bag

{title || "메시지 제목을 입력하세요"}

{body}

now

{hasImage && (
image
)}
{/* Full Screen Preview - iOS */}

Full Screen Preview

{/* 노치 */}
{/* 상태바 */}
9:41
signal_cellular_alt wifi battery_full
{/* 알림 카드 */}
shopping_bag

{title || "메시지 제목을 입력하세요"}

{truncatedBody}

now

{hasImage && (
image
)}
{/* 홈 인디케이터 */}
)} {/* Android 프리뷰 */} {tab === "android" && (
{/* Banner Notification */}

Banner Notification

shopping_bag

{appName}

·

now

{title || "메시지 제목을 입력하세요"}

{body}

{hasImage && (
image
)}
{/* Full Screen Preview - Android */}

Full Screen Preview

{/* 상태바 */}
12:30
signal_cellular_alt wifi battery_full
{/* 알림 카드 */}
shopping_bag

{appName}

·

now

expand_more

{title || "메시지 제목을 입력하세요"}

{truncatedBody}

{hasImage && (
image
)}
{hasImage && (
image
)}
{/* 네비게이션 바 */}
arrow_back circle crop_square
)}

이 미리보기는 예상 디자인입니다.
실제 표시는 기기 설정 및 OS 버전에 따라 다를 수 있습니다.

); }