private static function migrateConfig(array $config): array
    {
        // if old format "type" and "class" is set, migrate.
        if (isset($config['class'])) {
            do_action(
                'inpsyde.assets.debug',
                'The asset config-format with "type" and "class" is deprecated.',
                $config
            );

            $config['location'] = $config['type'] ?? Asset::FRONTEND;
            $config['type'] = $config['class'];

            unset($config['class']);
        }

        return $config;
    }