    private var inputBarView: some View {
        HStack(spacing: SodaSpacing.s8) {
            ZStack(alignment: .leading) {
                if messageText.isEmpty {
                    Text(I18n.UserCreatorChat.messagePlaceholder)
                        .appFont(size: 14, weight: .regular)
                        .foregroundColor(Color.gray500)
                }

                TextField("", text: $messageText)
                    .appFont(size: 14, weight: .regular)
                    .foregroundColor(.white)
                    .accentColor(Color.soda400)
                    .disabled(isInputEnabled == false)
                    .onSubmit { sendText() }
            }
            .padding(.horizontal, SodaSpacing.s16)
            .padding(.vertical, SodaSpacing.s12)
            .background(Color.gray900)
            .cornerRadius(999)

            Button(action: sendText) {
                Image("ic_message_send")
                    .resizable()
                    .frame(width: 24, height: 24)
                    .opacity(isSendEnabled ? 1 : 0.4)
            }
            .buttonStyle(.plain)
            .disabled(isSendEnabled == false)
        }
        .padding(.horizontal, SodaSpacing.s12)
        .padding(.vertical, SodaSpacing.s12)
        .frame(width: screenSize().width)
        .background(Color.black)
    }

    private var isInputEnabled: Bool {
        viewModel.socketState == .joined
    }

    private var isSendEnabled: Bool {
        isInputEnabled && messageText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty == false
    }

    private func sendText() {
        let trimmedText = messageText.trimmingCharacters(in: .whitespacesAndNewlines)
        guard isInputEnabled, trimmedText.isEmpty == false else { return }
        UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
        viewModel.sendText(trimmedText)
        messageText = ""
    }