<?php

namespace App\Helpers\Equipment;

use App\Helpers\CommonHelper;

abstract class EquipmentHelper extends CommonHelper
{
  public function __construct()
  {
    parent::__construct();
  }

  public function getListFilter(string $field, mixed $value, array $viewDatas, array $extras = []): string
  {
    switch ($field) {
      case 'user_uid':
      case 'old_clientinfo_uid':
      case 'clientinfo_uid':
      case 'serviceinfo_uid':
      case 'serverinfo_uid':
        $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
        $form = parent::getListFilter($field, $value, $viewDatas, $extras);
        break;
      default:
        $form = parent::getListFilter($field, $value, $viewDatas, $extras);
        break;
    }
    return $form;
  }
}
