private function isTogglerInActiveState($command, $model)
    {
        $dataProvider = $this->environment->getDataProvider($model->getProviderName());
        $propModel    = $model;

        if ($command instanceof TranslatedToggleCommandInterface
            && $dataProvider instanceof MultiLanguageDataProviderInterface
        ) {
            $language = $dataProvider->getCurrentLanguage();
            $dataProvider->setCurrentLanguage($command->getLanguage());
            $propModel = $dataProvider->fetch(
                $dataProvider
                    ->getEmptyConfig()
                    ->setId($model->getId())
                    ->setFields([$command->getToggleProperty()])
            );
            $dataProvider->setCurrentLanguage($language);
        }

        if ($command->isInverse()) {
            return !$propModel->getProperty($command->getToggleProperty());
        }

        return (bool) $propModel->getProperty($command->getToggleProperty());
    }