<?php

namespace App\Services;

use Illuminate\Support\Facades\Hash;

class ImportService
{
    public function hashImportedPassword(?string $temporaryPassword, ?string $passwordHash = null): ?string
    {
        if ($passwordHash) {
            return $passwordHash;
        }

        return $temporaryPassword ? Hash::make($temporaryPassword) : null;
    }
}
