<?php

namespace App\Enums\Traits;

use Illuminate\Support\Collection;

trait HasLabels
{
    public static function options(): Collection
    {
        return collect(self::cases())->mapWithKeys(function (self $case) {
            return [$case->value => $case->labels()];
        });
    }

    public function labelPowergridFilter(): string
    {
        return $this->labels();
    }
}