<?php

declare(strict_types=1);

namespace ImovelZapAi\Properties\Domain\Enums;

enum PropertyType: string
{
    case Apartment = 'apartamento';
    case House = 'casa';
    case CondoHouse = 'casa_condominio';
    case Land = 'terreno';
    case Commercial = 'comercial';
    case Farm = 'sitio_fazenda';
    case Kitnet = 'kitnet';
    case Studio = 'studio';
    case Penthouse = 'cobertura';

    public function label(): string
    {
        return match ($this) {
            self::Apartment => 'Apartamento',
            self::House => 'Casa',
            self::CondoHouse => 'Casa em condomínio',
            self::Land => 'Terreno',
            self::Commercial => 'Comercial',
            self::Farm => 'Sítio / Fazenda',
            self::Kitnet => 'Kitnet',
            self::Studio => 'Studio',
            self::Penthouse => 'Cobertura',
        };
    }

    /** @return list<string> */
    public static function values(): array
    {
        return array_map(static fn (self $case) => $case->value, self::cases());
    }
}
