<?php

declare(strict_types=1);

namespace Builder\Core\Foundation\Enums;

enum PublicationStatus: string
{
    case Draft = 'draft';
    case Published = 'published';
    case Scheduled = 'scheduled';

    public function label(): string
    {
        return (string) match ($this) {
            self::Draft => __('builder::builder.publishing.status_draft'),
            self::Published => __('builder::builder.publishing.status_published'),
            self::Scheduled => __('builder::builder.publishing.status_scheduled'),
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Draft => 'gray',
            self::Published => 'green',
            self::Scheduled => 'yellow',
        };
    }
}
