<?php

namespace App\Support;

class ProjectCategories
{
    /** @return array{id: string, name: string, icon: string, price: int}|null */
    public static function find(?string $id): ?array
    {
        if ($id === null || $id === '') {
            return null;
        }
        foreach (config('project_categories') as $c) {
            if ($c['id'] === $id) {
                return $c;
            }
        }

        return null;
    }
}
