export interface TeamMember {
  id: string
  username: string
  discriminator: string
  avatar: string
  role: "owner" | "admin" | "moderator" | "helper"
  status: "online" | "idle" | "dnd" | "offline"
}

export const mockTeamMembers: TeamMember[] = [
  {
    id: "1",
    username: "LinuxAdmin",
    discriminator: "0001",
    avatar: "https://api.dicebear.com/7.x/bottts/svg?seed=LinuxAdmin",
    role: "owner",
    status: "online",
  },
  {
    id: "2",
    username: "ArchWizard",
    discriminator: "1337",
    avatar: "https://api.dicebear.com/7.x/bottts/svg?seed=ArchWizard",
    role: "admin",
    status: "online",
  },
  {
    id: "3",
    username: "DebianDev",
    discriminator: "4242",
    avatar: "https://api.dicebear.com/7.x/bottts/svg?seed=DebianDev",
    role: "moderator",
    status: "idle",
  },
  {
    id: "4",
    username: "UbuntuUser",
    discriminator: "8080",
    avatar: "https://api.dicebear.com/7.x/bottts/svg?seed=UbuntuUser",
    role: "moderator",
    status: "dnd",
  },
  {
    id: "5",
    username: "FedoraFan",
    discriminator: "2024",
    avatar: "https://api.dicebear.com/7.x/bottts/svg?seed=FedoraFan",
    role: "helper",
    status: "online",
  },
  {
    id: "6",
    username: "MintMaster",
    discriminator: "3030",
    avatar: "https://api.dicebear.com/7.x/bottts/svg?seed=MintMaster",
    role: "helper",
    status: "offline",
  },
]

export const defaultRules = `# Server Rules

## 1. Be Respectful
Treat all members with respect. No harassment, hate speech, or discrimination of any kind.

## 2. Stay On Topic
Keep discussions related to Linux and open source in appropriate channels.

## 3. No Spam
Avoid excessive posting, self-promotion, or advertising without permission.

## 4. Help Others
Share your knowledge and help newcomers learn about Linux.

## 5. Follow Discord ToS
Adhere to Discord's Terms of Service and Community Guidelines.`

export interface ServerBranding {
  serverName: string
  headerImageUrl: string
  footerLogoUrl: string
  showHeaderImage: boolean
  showFooterLogo: boolean
}

export const defaultBranding: ServerBranding = {
  serverName: "Linux Community",
  headerImageUrl: "",
  footerLogoUrl: "",
  showHeaderImage: false,
  showFooterLogo: false,
}

export function generateDiscordEmbed(
  branding: ServerBranding,
  content: string,
  contentType: "rules" | "team"
) {
  const timestamp = new Date().toISOString()
  
  return {
    embeds: [
      {
        title: contentType === "rules" ? "Server Rules" : "Team Members",
        description: content,
        color: 5793266, // Discord blurple
        author: {
          name: branding.serverName,
          icon_url: branding.showHeaderImage ? branding.headerImageUrl : undefined,
        },
        footer: branding.showFooterLogo
          ? {
              text: branding.serverName,
              icon_url: branding.footerLogoUrl,
            }
          : undefined,
        timestamp,
      },
    ],
  }
}
