<?php

namespace App\Browser\Jobs\InstagramRepost;

use App\Models\JobRun;
use Illuminate\Support\Collection;

interface IInstagramVideoDownloader
{
    /**
     * Download the video from the given Instagram post URL.
     *
     * @param int $jobId The ID of the job for which the video is being downloaded.
     * @param JobRun $jobRun The job run instance for logging and tracking.
     * @param string $postUrl The URL of the Instagram post.
     * @param Collection $jobInfos The job information collection.
     * @param string $downloadFolder The folder where the video should be downloaded.
     * @param string $accountEmail The email or username of the Instagram account.
     * @param string $accountPassword The password for the Instagram account.
     * @return IInstagramVideo|null The path to the downloaded video file, or null if the download failed.
     */
    public function downloadVideo(int $jobId, JobRun $jobRun, string $postUrl, string $downloadFolder, string $accountEmail, string $accountPassword): ?IInstagramVideo;
}
