private function collectProjectFilesUseData(Project $project)
    {
        /** @var File $file */
        foreach ($project['compiled'] as $file) {
            if (! $uses = $file->getData('use')) {
                continue;
            }
            foreach ($uses as $use) {
                if (! $items = $file->getData($use.'_items')) {
                    continue;
                }

                array_walk_recursive($items, function (&$file, $fileKey) use ($project) {
                    /** @var File $compiledFile */
                    if (! $compiledFile = $project->get('compiled.'.$fileKey)) {
                        $file = null;
                    } else {
                        $file = new ViewFile($project, $compiledFile->getUid());
                    }
                });

                // Filter out deleted pages, such as drafts
                $items = array_filter($items, function ($value) {
                    return ! is_null($value);
                });

                $file->setData([$use.'_items' => $items]);
            }
        }
    }