export type Author = {
  pubkey: string;
  name: string;
  picture: string;
};

export type Reaction = {
  emoji: string;
  count: number;
};

export type Post = {
  id: string;
  author: Author;
  content: string;
  createdAt: string;
  reactions: Reaction[];
  zaps: number;
  replies?: Post[];
};

export type Thread = {
  id: string;
  title: string;
  tags: { label: string; color: string }[];
  op: Post;
  replyCount: number;
  viewCount: number;
  lastActivity: string;
  participants: Author[];
};

export const community = {
  name: "My big community",
  about:
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
};

const alice: Author = {
  pubkey: "npub1alice",
  name: "Alice",
  picture: "https://api.dicebear.com/9.x/thumbs/svg?seed=alice",
};
const bob: Author = {
  pubkey: "npub1bob",
  name: "Bob",
  picture: "https://api.dicebear.com/9.x/thumbs/svg?seed=bob",
};
const carol: Author = {
  pubkey: "npub1carol",
  name: "Carol",
  picture: "https://api.dicebear.com/9.x/thumbs/svg?seed=carol",
};
const dave: Author = {
  pubkey: "npub1dave",
  name: "Dave",
  picture: "https://api.dicebear.com/9.x/thumbs/svg?seed=dave",
};

export const threads: Thread[] = [
  {
    id: "1",
    title: "Discussion about an interesting topic",
    tags: [
      { label: "general", color: "green" },
      { label: "nostr", color: "blue" },
    ],
    op: {
      id: "op1",
      author: alice,
      content:
        "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n\nProin vitae ex iaculis, luctus elit in, fermentum turpis. Pellentesque sagittis congue quam erat, egestas a lobortis non, molestie ut enim. Sed tempus augue sapien laoreet, sed iaculis velit dictum diam.\n\nMaecenas sollicitudin erat eu metus lacinia congue. Nunc sagittis laoreet odio.",
      createdAt: "2025-01-15T10:00:00Z",
      reactions: [
        { emoji: "👍", count: 14 },
        { emoji: "🎉", count: 3 },
      ],
      zaps: 1200,
      replies: [
        {
          id: "r1",
          author: bob,
          content:
            "Etiam efficitur ornare odio, id elementum felis interdum sit amet. Nam tincidunt justo quam, eu rhoncus lectus pellentesque id. Vivamus fermentum accumsan lorem, laoreet molestie lectus facilisis in.",
          createdAt: "2025-01-15T11:00:00Z",
          reactions: [{ emoji: "👍", count: 5 }],
          zaps: 210,
        },
        {
          id: "r2",
          author: carol,
          content:
            "Maecenas sollicitudin erat eu metus lacinia congue. Nunc sagittis laoreet odio, non molestie eros. Proin vitae ex iaculis, luctus elit in, fermentum turpis. Pellentesque sagittis congue quam erat, egestas a lobortis non.",
          createdAt: "2025-01-15T12:30:00Z",
          reactions: [
            { emoji: "❤️", count: 2 },
            { emoji: "😂", count: 1 },
          ],
          zaps: 0,
        },
        {
          id: "r3",
          author: dave,
          content:
            "Interesting point. Sed tempus augue sapien laoreet, sed iaculis velit dictum diam. Fusce ullamcorper nulla a purus faucibus, vel hendrerit velit sodales. Nullam porttitor arcu vel diam hendrerit, nec gravida magna tincidunt.",
          createdAt: "2025-01-16T09:15:00Z",
          reactions: [{ emoji: "👍", count: 3 }],
          zaps: 50,
        },
        {
          id: "r4",
          author: alice,
          content:
            "To expand on what Dave said — Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.",
          createdAt: "2025-01-17T14:00:00Z",
          reactions: [
            { emoji: "🎉", count: 4 },
            { emoji: "👍", count: 2 },
          ],
          zaps: 320,
        },
        {
          id: "r5",
          author: bob,
          content:
            "Nam rutrum dolor in nulla imperdiet consequat. Sed tincidunt augue a velit consectetur, et cursus lorem auctor. Curabitur tempor felis nec magna blandit, ac posuere lorem varius.",
          createdAt: "2025-01-18T10:30:00Z",
          reactions: [],
          zaps: 0,
        },
        {
          id: "r6",
          author: carol,
          content:
            "Phasellus nec velit quis luctus maximus pellentesque. Nam erat, egestas a lobortis non, molestie ut enim. Quisque sagittis quam dui, nec pulvinar velit aliquam in. Sed volutpat interdum purus at convallis.",
          createdAt: "2025-01-19T16:45:00Z",
          reactions: [{ emoji: "❤️", count: 1 }],
          zaps: 80,
        },
        {
          id: "r7",
          author: dave,
          content:
            "Vivamus fermentum accumsan lorem, laoreet molestie lectus facilisis in. In hac habitasse platea dictumst. Nulla a quam tempor, posuere neque non, fringilla velit.",
          createdAt: "2025-01-20T11:00:00Z",
          reactions: [{ emoji: "👍", count: 7 }],
          zaps: 140,
        },
        {
          id: "r8",
          author: alice,
          content:
            "Mauro dui dolor, sagittis id sem nec, rhoncus consequat duis. Suspendisse dapibus mauris maximus mauris imperdiet. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.",
          createdAt: "2025-01-21T08:30:00Z",
          reactions: [
            { emoji: "🎉", count: 2 },
            { emoji: "👍", count: 6 },
          ],
          zaps: 450,
        },
        {
          id: "r9",
          author: bob,
          content:
            "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
          createdAt: "2025-01-22T13:15:00Z",
          reactions: [{ emoji: "👍", count: 4 }],
          zaps: 0,
        },
        {
          id: "r10",
          author: carol,
          content:
            "Great discussion everyone. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. This sums it up well I think.",
          createdAt: "2025-01-23T17:00:00Z",
          reactions: [
            { emoji: "❤️", count: 5 },
            { emoji: "🎉", count: 3 },
          ],
          zaps: 200,
        },
      ],
    },
    replyCount: 12,
    viewCount: 4200,
    lastActivity: "4h",
    participants: [alice, bob, carol, dave],
  },
  {
    id: "2",
    title:
      "Etiam pellentesque pulvinar quam sed interdum maximus pellentesque. Nam erat, egestas a lobortis non, molestie ut enim",
    tags: [{ label: "question", color: "yellow" }],
    op: {
      id: "op2",
      author: bob,
      content:
        "Etiam pellentesque pulvinar quam sed interdum. Vivamus fermentum accumsan lorem.",
      createdAt: "2025-01-14T09:00:00Z",
      reactions: [{ emoji: "👍", count: 2 }],
      zaps: 0,
    },
    replyCount: 0,
    viewCount: 310,
    lastActivity: "1d",
    participants: [bob],
  },
  {
    id: "3",
    title: "Pellentesque sagittis cinque quam et blandum",
    tags: [
      { label: "meta", color: "pink" },
      { label: "proposal", color: "blue" },
    ],
    op: {
      id: "op3",
      author: carol,
      content:
        "Phasellus nec velit quis luctus maximus pellentesque. Nam erat, egestas a lobortis non, molestie ut enim.",
      createdAt: "2025-01-13T14:00:00Z",
      reactions: [
        { emoji: "🎉", count: 7 },
        { emoji: "👍", count: 4 },
      ],
      zaps: 850,
    },
    replyCount: 7,
    viewCount: 890,
    lastActivity: "2d",
    participants: [carol, alice, dave],
  },
  {
    id: "4",
    title:
      "Nam rutrum dolor in nulla maximus pellentesque. Nam erat, egestas a lobortis non, molestie ut enim imperdiet consequat",
    tags: [{ label: "general", color: "green" }],
    op: {
      id: "op4",
      author: dave,
      content:
        "Nam rutrum dolor in nulla imperdiet consequat. Sed tincidunt augue a velit.",
      createdAt: "2025-01-12T08:00:00Z",
      reactions: [],
      zaps: 0,
    },
    replyCount: 3,
    viewCount: 140,
    lastActivity: "3d",
    participants: [dave, bob],
  },
  {
    id: "5",
    title:
      "Etiam maximus pellentesque. Nam erat, egestas a lobortis non, molestie ut enim efficitur ornare odio, id elementum felis",
    tags: [
      { label: "nostr", color: "blue" },
      { label: "dev", color: "green" },
    ],
    op: {
      id: "op5",
      author: alice,
      content:
        "Etiam efficitur ornare odio, id elementum felis interdum sit amet. Nam tincidunt justo quam.",
      createdAt: "2025-01-11T16:00:00Z",
      reactions: [{ emoji: "👍", count: 11 }],
      zaps: 340,
    },
    replyCount: 31,
    viewCount: 4100,
    lastActivity: "1h",
    participants: [alice, carol, bob, dave],
  },
  {
    id: "6",
    title: "Maecenas sollicitudin erat eu metus lacinia congue",
    tags: [{ label: "announcement", color: "pink" }],
    op: {
      id: "op6",
      author: carol,
      content:
        "Maecenas sollicitudin erat eu metus lacinia congue. Nunc sagittis laoreet odio.",
      createdAt: "2025-01-10T12:00:00Z",
      reactions: [{ emoji: "🎉", count: 9 }],
      zaps: 500,
    },
    replyCount: 5,
    viewCount: 620,
    lastActivity: "4d",
    participants: [carol, dave],
  },
  {
    id: "7",
    title: "Praesent blandit bibendum lectus, nec tristique nisl",
    tags: [{ label: "general", color: "green" }],
    op: {
      id: "op7",
      author: bob,
      content:
        "Praesent blandit bibendum lectus, nec tristique nisl nam rutrum.",
      createdAt: "2025-01-09T10:00:00Z",
      reactions: [],
      zaps: 0,
    },
    replyCount: 0,
    viewCount: 95,
    lastActivity: "5d",
    participants: [bob],
  },
];

export type ChatMessage = {
  id: string;
  author: Author;
  content: string;
  createdAt: string;
  reactions?: Reaction[];
  zaps?: number;
};

export const chatMessages: ChatMessage[] = [
  {
    id: "c1",
    author: alice,
    content:
      "Quisque sagittis quam dui, nec pulvinar velit aliquam in. Sed volutpat in.",
    createdAt: "2025-01-15T13:00:00Z",
    reactions: [{ emoji: "👍", count: 3 }],
    zaps: 210,
  },
  {
    id: "c2",
    author: bob,
    content:
      "Vivamus fermentum accumsan lorem, laoreet molestie lectus facilisis in.",
    createdAt: "2025-01-15T13:02:00Z",
  },
  {
    id: "c3",
    author: carol,
    content:
      "Proin vitae ex iaculis, luctus elit in, fermentum turpis. Pellentesque sagittis congue quam.",
    createdAt: "2025-01-15T13:05:00Z",
    reactions: [
      { emoji: "❤️", count: 2 },
      { emoji: "🎉", count: 1 },
    ],
  },
  {
    id: "c4",
    author: dave,
    content:
      "Mauro dui dolor, sagittis id sem nec, rhoncus consequat duis. Suspendisse dapibus mauris maximus mauris imperdiet.",
    createdAt: "2025-01-15T13:08:00Z",
    zaps: 500,
  },
  {
    id: "c5",
    author: alice,
    content:
      "In hac habitasse platea dictumst. Nulla a quam tempor, posuere neque non, fringilla velit.",
    createdAt: "2025-01-15T13:10:00Z",
    reactions: [{ emoji: "👍", count: 7 }],
    zaps: 140,
  },
];
