/*
 * Copyright (c) 2025 Element Creations Ltd.
 * Copyright 2023-2025 New Vector Ltd.
 *
 * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
 * Please see LICENSE files in the repository root for full details.
 */

package id.databisnis.android.bachot.features.messages.impl

import id.databisnis.android.bachot.features.messages.api.timeline.voicemessages.composer.VoiceMessageComposerState
import id.databisnis.android.bachot.features.messages.impl.actionlist.ActionListState
import id.databisnis.android.bachot.features.messages.impl.crypto.identity.IdentityChangeState
import id.databisnis.android.bachot.features.messages.impl.link.LinkState
import id.databisnis.android.bachot.features.messages.impl.messagecomposer.MessageComposerState
import id.databisnis.android.bachot.features.messages.impl.pinned.banner.PinnedMessagesBannerState
import id.databisnis.android.bachot.features.messages.impl.timeline.TimelineState
import id.databisnis.android.bachot.features.messages.impl.timeline.components.customreaction.CustomReactionState
import id.databisnis.android.bachot.features.messages.impl.timeline.components.reactionsummary.ReactionSummaryState
import id.databisnis.android.bachot.features.messages.impl.timeline.components.receipt.bottomsheet.ReadReceiptBottomSheetState
import id.databisnis.android.bachot.features.messages.impl.timeline.protection.TimelineProtectionState
import id.databisnis.android.bachot.features.roomcall.api.RoomCallState
import id.databisnis.android.bachot.features.roommembermoderation.api.RoomMemberModerationState
import id.databisnis.android.bachot.libraries.architecture.AsyncData
import id.databisnis.android.bachot.libraries.designsystem.components.avatar.AvatarData
import id.databisnis.android.bachot.libraries.designsystem.utils.snackbar.SnackbarMessage
import id.databisnis.android.bachot.libraries.matrix.api.core.RoomId
import id.databisnis.android.bachot.libraries.matrix.api.encryption.identity.IdentityState
import id.databisnis.android.bachot.libraries.matrix.api.room.tombstone.SuccessorRoom
import kotlinx.collections.immutable.ImmutableList

data class MessagesState(
    val roomId: RoomId,
    val roomName: String?,
    val roomAvatar: AvatarData,
    val heroes: ImmutableList<AvatarData>,
    val userEventPermissions: UserEventPermissions,
    val composerState: MessageComposerState,
    val voiceMessageComposerState: VoiceMessageComposerState,
    val timelineState: TimelineState,
    val timelineProtectionState: TimelineProtectionState,
    val identityChangeState: IdentityChangeState,
    val linkState: LinkState,
    val actionListState: ActionListState,
    val customReactionState: CustomReactionState,
    val reactionSummaryState: ReactionSummaryState,
    val readReceiptBottomSheetState: ReadReceiptBottomSheetState,
    val snackbarMessage: SnackbarMessage?,
    val inviteProgress: AsyncData<Unit>,
    val showReinvitePrompt: Boolean,
    val enableTextFormatting: Boolean,
    val roomCallState: RoomCallState,
    val appName: String,
    val pinnedMessagesBannerState: PinnedMessagesBannerState,
    val dmUserVerificationState: IdentityState?,
    val roomMemberModerationState: RoomMemberModerationState,
    val successorRoom: SuccessorRoom?,
    val eventSink: (MessagesEvents) -> Unit
) {
    val isTombstoned = successorRoom != null
}
