protected function applyConfig(array $moduleConfiguration)
    {
        foreach ($moduleConfiguration['customer_group'] as $customerGroupData) {
            if (CustomerGroupQuery::create()->findOneByCode($customerGroupData['code']) === null) {
                $customerGroup = (new CustomerGroup)
                    ->setCode($customerGroupData['code']);

                foreach ($customerGroupData['descriptive'] as $descriptiveData) {
                    $customerGroup
                        ->setLocale($descriptiveData['locale'])
                        ->setTitle($descriptiveData['title'])
                        ->setDescription($descriptiveData['description']);
                }

                $customerGroup->save();
            }
        }

        if ($moduleConfiguration['default']) {
            $customerGroup = CustomerGroupQuery::create()->findOneByCode($moduleConfiguration['default']);
            if ($customerGroup !== null) {
                $this->resetDefault();

                $customerGroup
                    ->setIsDefault(true)
                    ->save();
            }
        }
    }