<?php

namespace App\Enums;

enum Weekday: int
{
    case Sunday    = 0;
    case Monday    = 1;
    case Tuesday   = 2;
    case Wednesday = 3;
    case Thursday  = 4;
    case Friday    = 5;
    case Saturday  = 6;

    public function label(): string
    {
        return match ($this) {
            self::Sunday    => 'Domingo',
            self::Monday    => 'Lunes',
            self::Tuesday   => 'Martes',
            self::Wednesday => 'Miércoles',
            self::Thursday  => 'Jueves',
            self::Friday    => 'Viernes',
            self::Saturday  => 'Sábado',
        };
    }

    public function shortLabel(): string
    {
        return match ($this) {
            self::Sunday    => 'Dom',
            self::Monday    => 'Lun',
            self::Tuesday   => 'Mar',
            self::Wednesday => 'Mié',
            self::Thursday  => 'Jue',
            self::Friday    => 'Vie',
            self::Saturday  => 'Sáb',
        };
    }
}
