<?php

namespace App\Helpers;

class BadgeHelper
{
  public static function priorityColor(string $priority): string
  {
    return match ($priority) {
      'HIGH'   => 'danger',
      'MEDIUM' => 'warning',
      'LOW'    => 'success',
      default  => 'secondary'
    };
  }

  public static function priorityIcon(string $priority): string
  {
    return match ($priority) {
      'HIGH'   => 'bi-arrow-up-circle',
      'MEDIUM' => 'bi-dash-circle',
      'LOW'    => 'bi-arrow-down-circle',
      default  => 'bi-flag-fill'
    };
  }

  public static function statusColor(string $status): string
  {
    return match ($status) {
      'OPEN'        => 'secondary',
      'ASSIGNED'    => 'primary',
      'IN PROGRESS' => 'info',
      'ESCALATED'   => 'danger',
      'SOLVED'      => 'success',
      'CANCELED'    => 'dark',
      default       => 'secondary'
    };
  }

  public static function activityColor(string $type)
  {
    return match ($type) {
      'CREATE'   => 'success',
      'ASSIGN'   => 'primary',
      'UPDATE_STATUS'   => 'warning',
      'COMMENT'  => 'info',
      'ESCALATE' => 'danger',
      'SOLVED'   => 'success',
      'CANCELED'   => 'dark',
      default    => 'secondary'
    };
  }

  public static function activityIcon(string $type)
  {
    return match ($type) {
      'CREATE'   => 'bi-plus-circle',
      'ASSIGN'   => 'bi-person-check',
      'UPDATE_STATUS'   => 'bi-arrow-repeat',
      'COMMENT'  => 'bi-chat-left-text',
      'ESCALATE' => 'bi-arrow-up-right-circle',
      'SOLVED'   => 'bi-check-circle',
      'CANCELED'   => 'bi-x-circle',
      default    => 'bi-circle',
    };
  }
}
