import { EventKind, TaggedNostrEvent, NostrLink } from "@snort/system"; import { Icon } from "./icon"; import { Goal } from "./goal"; import { Note } from "./note"; import { EmojiPack } from "./emoji-pack"; import { Badge } from "./badge"; import { GOAL, LIVE_STREAM_CLIP, StreamState } from "@/const"; import { useEventFeed } from "@snort/system-react"; import LiveStreamClip from "./stream/clip"; import { ExternalLink } from "./external-link"; import { extractStreamInfo } from "@/utils"; import LiveVideoPlayer from "./stream/live-video-player"; import { HTMLProps } from "react"; interface EventProps { link: NostrLink; } export function EventIcon({ kind }: { kind?: EventKind }) { switch (kind) { case GOAL: return ; case EventKind.EmojiSet: return ; case EventKind.Badge: return ; case EventKind.TextNote: return ; } } export function NostrEvent({ ev }: { ev: TaggedNostrEvent }) { switch (ev.kind) { case GOAL: { return ; } case EventKind.EmojiSet: { return ; } case EventKind.Badge: { return ; } case EventKind.TextNote: { return ; } case LIVE_STREAM_CLIP: { return ; } case EventKind.LiveEvent: { const info = extractStreamInfo(ev); return ( ); } default: { const link = NostrLink.fromEvent(ev); return {link.encode()}; } } } export function EventEmbed({ link, ...props }: EventProps & HTMLProps) { const event = useEventFeed(link); if (event) { return ; } }