content: import 'package:flutter/cupertino.dart';
  import 'package:flutter/material.dart';
  
  import '../../../../../../shared/general/hive_builder.dart';
  import '../../../../../../types/enums/hive_keys.dart';
  import '../../../../../../types/enums/settings_keys.dart';
  import 'chat_type_dropdown.dart';
  import 'username_action_row.dart';
  import 'username_dropdown.dart';
  
  class ChatUsernameBar extends StatelessWidget {
    const ChatUsernameBar({
      super.key,
    });
  
    @override
    Widget build(BuildContext context) {
      return HiveBuilder<dynamic>(
        hiveKey: HiveKeys.Settings,
        rebuildKeys: const [
          SettingsKeys.SelectedChatType,
          SettingsKeys.TwitchUsernames,
          SettingsKeys.SelectedTwitchUsername,
          SettingsKeys.YouTubeUsernames,
          SettingsKeys.SelectedYouTubeUsername,
          SettingsKeys.OwncastUsernames,
          SettingsKeys.SelectedOwncastUsername,
        ],
        builder: (context, settingsBox, child) => Padding(
          padding: const EdgeInsets.only(left: 8.0, right: 8.0),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            crossAxisAlignment: CrossAxisAlignment.end,
            children: [
              Flexible(
                child: ConstrainedBox(
                  constraints: const BoxConstraints(
                    maxWidth: 256.0,
                  ),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisSize: MainAxisSize.min,
                    children: [
                      ChatTypeDropdown(settingsBox: settingsBox),
                      UsernameDropdown(
                        settingsBox: settingsBox,
                      ),
                    ],
                  ),
                ),
              ),
              const SizedBox(width: 12.0),
              UsernameActionRow(
                settingsBox: settingsBox,
              ),
            ],
          ),
        ),
      );
    }
  }
  