protected function reorderWidgets($widgets)
    {
        $formatted = [];

        foreach ($widgets as $key => $widget) {
            if (is_array($widget)) {
                $formatted[] = [
                    'name' => array_get($widget, 0),
                    'order' => array_get($widget, 1),
                ];
            } else {
                $formatted[] = [
                    'name' => $widget,
                    'order' => $key,
                ];
            }
        }

        return collect($formatted)->sortBy(function ($widget) {
            return $widget['order'];
        })->all();
    }