<?php

declare(strict_types=1);

namespace App\Framework\LiveComponents\Contracts;

use App\Framework\Core\ValueObjects\Byte;
use App\Framework\LiveComponents\ValueObjects\UploadedComponentFile;

interface Uploadable
{
    /**
     * Handle file upload
     *
     * @return array Updated component data
     */
    public function handleUpload(UploadedComponentFile $file): array;

    /**
     * Validate uploaded file
     */
    public function validateFile(UploadedComponentFile $file): bool;

    /**
     * Get maximum file size
     */
    public function getMaxFileSize(): Byte;

    /**
     * Get allowed MIME types
     *
     * @return array<string>
     */
    public function getAllowedMimeTypes(): array;
}
