<?php

namespace App\GraphQL\Mutations;

use App\IO\ExcelSchedulePreviewer;

final class ImportSchedulePreview
{
    /**
     * @param  null  $_
     * @param  array{}  $args
     */
    public function __invoke($_, array $args)
    {
        $path = uploadFile($args['file']);
        $groups = (new ExcelSchedulePreviewer(2))->import(public_path() ."/". $path);
        
        return $groups;
    }
}
