protected static function stripAbsolutePath(array $paths, $plugin = null): array
    {
        foreach (App::path('Template', $plugin) as $templatesPath) {
            array_walk($paths, function (&$path) use ($templatesPath) {
                if (substr($path, 0, strlen($templatesPath)) == $templatesPath) {
                    $path = substr($path, strlen($templatesPath));
                }
            });
        }

        return $paths;
    }