protected function getSettingMessages(FieldTypeInterface $setting): array
    {
        $messages = [];

        foreach ($setting->getOption('messages', []) as $attr => $message) {
            $messages[$setting->getName().'.'.$attr] = $message;
        }

        return $messages;
    }