import React from 'react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { fireEvent, renderWithProviders, screen } from '../../test/utils' import { CustomMessageInput } from '.' let mockChannelData: Record = {} // Controls whether the composer treats the input as sendable, which in turn // enables/disables the send button. Defaults to false to match the existing // suite; individual tests flip it to true when they need an enabled button. let mockHasSendableData = false // Stable submit spy so a test can assert the send button still fires it on // click (a new vi.fn() per render would be unassertable). const mockHandleSubmit = vi.fn() let mockContextSendButton: | React.ComponentType<{ sendMessage: (...args: unknown[]) => unknown disabled?: boolean }> | undefined = ({ sendMessage, disabled }) => (