<?php  namespace App\Services;  use App\Contracts\HasMedia; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Collection; use Spatie\MediaLibrary\Support\MediaStream; use Spatie\MediaLibrary\MediaCollections\Models\Media;  class MediaStorage { 	public const FILENAME_GLUE = '-'; 	public const MEDIA_PREFIX = 'media'; 	public const THUMB_KEY = 'thumb'; 	public const IDS_KEY = 'ids'; 	public const NEW_NAMES_KEY = 'new_names'; 	public const TITLE_KEY = 'titles'; 	public const ORDER_KEY = 'order'; 	public const MARKED_REMOVAL_KEY = 'marked_removal';  	protected object $model; 	protected Request $request;  	public function __construct(HasMedia $model){}  	public static function getValidationRules(?string $prefix = null): array 	{ 		$prefix ??= self::MEDIA_PREFIX; 		$prefix = empty($prefix) ? '' : $prefix . '.';  		return [ 			$prefix . self::IDS_KEY => ['array'], 			$prefix . self::IDS_KEY . '.*' => ['required', 'uuid'], 			$prefix . self::MARKED_REMOVAL_KEY => ['array'], 			$prefix . self::MARKED_REMOVAL_KEY . '.*' => ['required', 'uuid'], 			$prefix . self::NEW_NAMES_KEY => ['array'], 			$prefix . self::NEW_NAMES_KEY . '.*' => ['required', 'string', 'max:250'], 			$prefix . self::TITLE_KEY => ['array'], 			$prefix . self::TITLE_KEY . '.*' => ['nullable', 'string', 'max:250'], 			$prefix . self::ORDER_KEY => ['array'], 			$prefix . self::ORDER_KEY . '.*' => ['nullable', 'integer', 'min:0'], 		]; 	}  	public static function mergeValidationRules(array $rules = [], ?string $prefix = null): array 	{ 		return array_replace(static::getValidationRules($prefix), $rules); 	}  	public function setModel(HasMedia $model): self{}  	public function setRequest(Request $request): self{}  	public function setDisk(?string $disk = null): self{}  	public function handle(?array $media = [], array $pairs = []): self{}  	public function handleFromNestedArray(array $inputArray, ?array $media = [], array $pairs = []): self{}  	public function files(string $collection = ''): Collection{}  	public function deleteFiles(string $collection = ''): self{}  	public function isAudio(object $file): bool{}  	public function isImage(object $file): bool{}  	public function isVideo(object $file): bool{}  	public function isMime(object $file, string $mime): bool{}  	public function getMime(object $file): string{}  	public function url(?object $file = null, ?string $conversion = null): ?string{}  	public function getProtectedFirst(string $collection = '', ?string $conversion = null): ?string{}  	public function getProtectedFirstThumb(string $collection = ''): ?string{}  	public function getProtectedThumb(object $file): ?string{}  	public function protectedUrl(?object $file = null, ?string $conversion = null): ?string{}  	public function getProtectedAll(string $collection = '', ?string $conversion = null): array{}  	public function getProtectedAllThumbs(string $collection = ''): array{}  	public function getAll(string $collection = '', ?string $conversion = null): array{}  	public function getAllThumbs(string $collection = ''): array{}  	public function getThumb(object $file): ?string{}  	public function getFirst(string $collection = '', ?string $conversion = null): ?string{}  	public function getFirstThumb(string $collection = ''): ?string{}  	public function getFirstFile(string $collection = ''): ?object{}  	public function getResponsiveImages(object $file, ?string $conversion = null, bool $protected = false): array{}  	public function getResponsiveImage(string|object $file, int $width, ?string $conversion = null, bool $protected = false): ?string{}  	public function size(object $file): int{}  	public function getFileId(object $file): string{}  	public function getOrder(object $file): ?int{}  	public function getPath(object $file, ?string $conversion = null): string{}  	public function getName(object $file): string{}  	public function getTitle(object $file): string{}  	public function getExt(object $file): string{}  	public function lastModified(object $file): Carbon{}  	public function createdAt(object $file): Carbon{}  	public function generateFileName(string $filename): string{}  	public function zip(string $zip, array $collections = []): MediaStream{}  	public function saveFromFileUpload(object $file, array $options): ?Media{}  	public function saveFromUrl(string $url, array $options): Media{}  	public function saveFromString(string $string, array $options): Media{}  	public function saveFromBase64(string $string, array $options): Media{}  	public function saveFromStream(mixed $stream, array $options): Media{}  	protected function getProtectedMediaRoute(object $file, array $params = []): string{}  	protected function resolveMediaConfig(array $pairs = []): array{}  	protected function deleteFromRequest(?array $media = []): self{}  	protected function renameAndReorderFromRequest(?array $media = []): self{}  	protected function registerMediaCollections(array $pairs = []): self{}  	protected function saveFromRequest(array $pairs = []): self{} }