<?php

declare(strict_types=1);

namespace App\Framework\Core\ValueObjects;

/**
 * Enum representing orientation of dimensions
 */
enum Orientation: string
{
    case PORTRAIT = 'portrait';
    case LANDSCAPE = 'landscape';
    case SQUARE = 'square';

    /**
     * Get human-readable label
     */
    public function getLabel(): string
    {
        return match($this) {
            self::PORTRAIT => 'Portrait',
            self::LANDSCAPE => 'Landscape',
            self::SQUARE => 'Square'
        };
    }

    /**
     * Check if orientation is wider than tall
     */
    public function isWide(): bool
    {
        return $this === self::LANDSCAPE;
    }

    /**
     * Check if orientation is taller than wide
     */
    public function isTall(): bool
    {
        return $this === self::PORTRAIT;
    }

    /**
     * Check if orientation is equal width and height
     */
    public function isEqual(): bool
    {
        return $this === self::SQUARE;
    }
}
