private function installComplement($complement, $path, $slug, $root = true)
    {
        $path = ($root) ? $path : $path . key($complement) . '/';

        if (! $this->validateRoute($path)) {
            return false;
        }

        if (! File::createDir($path)) {
            $msg = "The directory exists or couldn't be created in: $path";
            self::$errors[] = ['message' => $msg];

            return false;
        }

        foreach ($complement as $folder => $file) {
            foreach ($file as $key => $val) {
                if (is_array($val)) {
                    $this->installComplement([$key => $val], $path, $slug, 0);
                    continue;
                }

                $filePath = $path . $val;

                $complementType = self::getType('strtoupper');
                $complementPath = App::$complementType() . $slug . '/';

                $url = Url::addBackSlash($this->complement['url-import']);
                $route = str_replace($complementPath, '', $filePath);
                $fileUrl = $url . '/' . $route;

                $this->saveRemoteFile($fileUrl, $filePath);
            }
        }

        return true;
    }