private function setComplementParams($complement)
    {
        $params = array_intersect_key(
            array_flip(self::$required),
            $complement
        );

        $slug = explode('.', basename($complement['config-file']));
        $default['slug'] = $slug[0];
        $complementType = self::getType('strtoupper');
        $path = App::$complementType() . $default['slug'] . '/';

        if (count($params) != 7) {
            $msg = self::getType('ucfirst') . " configuration file isn't correct";
            throw new ComplementException($msg . ': ' . $path . '.');
        }

        $default['url-import'] = '';
        $default['hooks-controller'] = 'Launcher';
        $default['path']['root'] = Url::addBackSlash($path);
        $default['folder'] = $default['slug'] . '/';
        $default['license'] = 'MIT';
        $default['author'] = '';
        $default['author-url'] = '';
        $default['extra'] = [];

        $lang = $this->getLanguage();

        if (isset($complement['name'][$lang])) {
            $complement['name'] = $complement['name'][$lang];
        }

        if (isset($complement['description'][$lang])) {
            $complement['description'] = $complement['description'][$lang];
        }

        $this->complement = array_merge($default, $complement);

        $this->setImage();
    }