import {signal} from '@angular/core';
import {FileData} from '@chatenium/chatenium-sdk/domain/fileUploadService.schema';
import {FileDataWithPreview} from './message-box';

export class MessageBoxViewModel {
  onMessageSend: (message: string, files: FileDataWithPreview[] | null) => void

  constructor(onMessageSend: (message: string, files: FileDataWithPreview[] | null) => void) {
    this.onMessageSend = onMessageSend
  }

  message = signal<string>("")
  files = signal<FileDataWithPreview[]>([])
  dialogOpen = signal<boolean>(false)
  editingMessage = signal<{messageId: string, message: string} | null >(null)
}
