<?php  namespace App\Services;  use Carbon\Carbon; use App\Contracts\HasMedia; use Illuminate\Http\Request; use Illuminate\Http\UploadedFile; use Illuminate\Support\Collection; use App\Models\Media as MediaModel; 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 ??= static::MEDIA_PREFIX; 		$prefix = empty($prefix) ? '' : $prefix . '.';  		return [ 			$prefix . static::IDS_KEY => ['array'], 			$prefix . static::IDS_KEY . '.*' => ['required', 'uuid', 'distinct'], 			$prefix . static::MARKED_REMOVAL_KEY => ['array'], 			$prefix . static::MARKED_REMOVAL_KEY . '.*' => ['required', 'uuid', 'distinct'], 			$prefix . static::NEW_NAMES_KEY => ['array'], 			$prefix . static::NEW_NAMES_KEY . '.*' => ['required', 'string', 'max:250'], 			$prefix . static::TITLE_KEY => ['array'], 			$prefix . static::TITLE_KEY . '.*' => ['nullable', 'string', 'max:250'], 			$prefix . static::ORDER_KEY => ['array'], 			$prefix . static::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 handleCloneFromNestedArray(array $inputArray, ?array $media = [], array $pairs = []): self{}  	public function files(string $collection = ''): Collection{}  	public function deleteFiles(string $collection = ''): self{}  	public function isAudio(MediaModel $file): bool{}  	public function isImage(MediaModel $file): bool{}  	public function isVideo(MediaModel $file): bool{}  	public function isMime(MediaModel $file, string $mime): bool{}  	public function getMime(MediaModel $file): string{}  	public function url(?MediaModel $file = null, ?string $conversion = null): ?string{}  	public function getProtectedFirst(string $collection = '', ?string $conversion = null): ?string{}  	public function getProtectedFirstThumb(string $collection = ''): ?string{}  	public function getProtectedThumb(MediaModel $file): ?string{}  	public function protectedUrl(?MediaModel $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(MediaModel $file): ?string{}  	public function getFirst(string $collection = '', ?string $conversion = null): ?string{}  	public function getFirstThumb(string $collection = ''): ?string{}  	public function getFirstFile(string $collection = ''): ?MediaModel{}  	public function getResponsiveImages(MediaModel $file, ?string $conversion = null, bool $protected = false): array{}  	public function getResponsiveImage(string|MediaModel $file, int $width, ?string $conversion = null, bool $protected = false): ?string{}  	public function size(MediaModel $file): int{}  	public function getFileId(MediaModel $file): string{}  	public function getOrder(MediaModel $file): ?int{}  	public function getPath(MediaModel $file, ?string $conversion = null): string{}  	public function getName(MediaModel $file): string{}  	public function getTitle(MediaModel $file): string{}  	public function getExt(MediaModel $file): string{}  	public function lastModified(MediaModel $file): ?Carbon{}  	public function createdAt(MediaModel $file): ?Carbon{}  	public function generateFileName(string $filename): string{}  	public function zip(string $zip, array $collections = []): MediaStream{}  	public function saveFromFileUpload(UploadedFile $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(MediaModel $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{} }