export const CODE_EXAMPLES = {
  matrixChat: {
    title: 'game_rooms.go - Raum erstellen',
    language: 'Go',
    code: `func (s *MatrixService) CreateGameTeamRoom(
    ctx context.Context,
    config GameRoomConfig,
) (*CreateRoomResponse, error) {
    roomName := fmt.Sprintf("Breakpilot Drive - Team %s",
        config.SessionID[:8])

    req := CreateRoomRequest{
        Name:       roomName,
        Visibility: "private",
        Preset:     "private_chat",
        // ... power levels, encryption
    }

    return s.CreateRoom(ctx, req)
}`,
  },
  jitsiVideo: {
    title: 'game_meetings.go - Meeting erstellen',
    language: 'Go',
    code: `func (s *JitsiService) CreateChallengeMeeting(
    ctx context.Context,
    config GameMeetingConfig,
    challengerName string,
    opponentName string,
) (*GameMeetingLink, error) {
    meeting := Meeting{
        RoomName: fmt.Sprintf("bp-challenge-%s",
            config.SessionID[:8]),
        Subject: fmt.Sprintf("Challenge: %s vs %s",
            challengerName, opponentName),
        Config: &MeetingConfig{
            StartWithAudioMuted: false,
            RequireDisplayName:  true,
        },
    }

    return s.CreateMeetingLink(ctx, meeting)
}`,
  },
  unityIntegration: {
    title: 'MultiplayerManager.cs - Session erstellen',
    language: 'C#',
    code: `public void CreateSession(
    GameMode mode,
    string displayName,
    Action<MultiplayerSession> onSuccess,
    Action<string> onError
) {
    localPlayer = new Player {
        id = Guid.NewGuid().ToString(),
        displayName = displayName,
        isHost = true,
        isReady = false
    };

    state = MultiplayerState.Connecting;
    StartCoroutine(CreateSessionCoroutine(
        mode, onSuccess, onError));
}`,
  },
} as const
