<?php

namespace Ecoyn\Setup;

use QUI;
use QUI\Config;

final class PackageConfig
{
    public static function get(string $package): Config
    {
        $Config = QUI::getPackage($package)->getConfig();

        if ($Config === null) {
            throw new QUI\Exception('Package configuration is unavailable: ' . $package);
        }

        return $Config;
    }
}
