protected function generateConfig(): array
    {
        $config = [
            'addLabel' => $GLOBALS['TL_LANG']['MSC']['cfg_tags.add'],
            'allowCreate' => isset($this->tagsCreate) ? (bool) $this->tagsCreate : true,
        ];

        // Maximum number of items
        if (isset($this->maxItems)) {
            $config['maxItems'] = (int) $this->maxItems;
        }

        return $config;
    }