<?php

declare(strict_types=1);

namespace apexl\Io\modules\tabulator\Enums;

use JsonSerializable;

enum TabulatorFormatter implements JsonSerializable
{
    case CONCATENATE;
    case IMAGE;
    case IMAGE_MULTIPLE;
    case LINK;
    case HTML;
    case TEXT_BLOCK;
    case ARRAY;
    case DATETIME;
    case MONEY;
    case TICK_CROSS;
    case BEATING_HEART;
    case TELEPHONE;
    case EMAIL;
    case XERO;
    case CONDITION;
    case DATE_DUE;
    case FONT_AWESOME_ICON;
    case NUMBER;
    case SHORT_NUMBER;
    case STATUS;
    case PO_STATUS;
    case SALES_ORDER_STATUS;
    case FINANCE_ESTIMATE;
    case FINANCE_ESTIMATE_STATUS;
    case PERCENTAGE;
    case CHECK_STATUS;
    case COLOR;
    case TRAILER_CONFIG_STATUS;
    case WEBROTATE;
    case ACTIONS;
    case HIGHLIGHT_LAST_ACTIVITY;

    public function jsonSerialize(): string
    {
        return match (true) {
            ($this === self::TICK_CROSS) => 'tickCross',
            default => strtolower($this->name),
        };
    }
}
