from pathlib import Path

def create_mock_video(req: dict, job_id: str, output_dir: Path) -> dict:
    """Creates a placeholder text file so the app can be tested without a GPU."""
    out = output_dir / f"{job_id}.txt"
    out.write_text(
        "This is a mock output. Connect ComfyUI or CogVideoX to generate real video.\n\n"
        f"Prompt: {req['prompt']}\n"
        f"Size: {req['width']}x{req['height']} Duration: {req['duration_seconds']}s FPS: {req['fps']}\n",
        encoding="utf-8",
    )
    return {"status": "completed", "video_url": f"/outputs/{out.name}"}
