import type { DeleteMediaViewData } from '@/lib/builders/view-data/DeleteMediaViewData'; import { ViewModel } from '../contracts/view-models/ViewModel'; /** * Delete Media View Model * * Represents the result of a media deletion operation * Composes ViewData for UI consumption. */ export class DeleteMediaViewModel extends ViewModel { success: boolean; error?: string; constructor(viewData: DeleteMediaViewData) { super(); this.success = viewData.success; if (viewData.error !== undefined) { this.error = viewData.error; } } /** UI-specific: Whether the deletion was successful */ get isSuccessful(): boolean { return this.success; } /** UI-specific: Whether there was an error */ get hasError(): boolean { return !!this.error; } }