protected function hydrateWidgets($widgets)
    {
        $isWidgetsStringBased = static::isWidgetsStringBased($widgets);
        $isWidgetsIntBased = static::isWidgetsIntBased($widgets);
        $field = $isWidgetsStringBased ? 'id' : 'id';
        $className = static::getWidgetClassName();

        return $isWidgetsStringBased || $isWidgetsIntBased
            ? $className::query()->whereIn($field, (array) $widgets)->get() : collect($widgets);
    }