public function perform(
        AgentInterface $agent,
        GridMetadata $gridMetadata,
        string $actionName,
        array $selectedIdentifiers
    ): ActionResponseInterface {
        $actionMetadatas = $gridMetadata->getActions();
        if (!isset($actionMetadatas[$actionName])) {
            throw new \InvalidArgumentException(sprintf(
                'Action "%s" is not available for class "%s". Availabile actions: "%s"',
                $actionName, $gridMetadata->getClassMetadata()->name, implode('", "', array_keys($actionMetadatas))
            ));
        }

        $actionMetadata = $actionMetadatas[$actionName];
        $action = $this->registry->get($actionMetadata->getType());
        $options = new OptionsResolver();
        $action->configureOptions($options);
        $options = $options->resolve($actionMetadata->getOptions());

        return $action->perform($agent, $gridMetadata->getClassMetadata()->name, $selectedIdentifiers, $options);
    }