<?php

declare(strict_types=1);

namespace App\Filters\Components;

use Closure;

class Designation implements ComponentInterface
{
    public function handle(array $content, Closure $next): mixed
    {
        if (isset($content['params']['Designation'])) {
            $value = $content['params']['Designation'];

            $content['builder']->where('Designation_id', '=', $value);
        }

        return $next($content);
    }
}
