protected function prepareSetting(FieldTypeInterface $setting)
    {
        if (empty($setting->getTheme()) || is_array($setting->getTheme())) {
            // Page settings only have the "themosis" theme available.
            $setting->setTheme('themosis.pages');
        }

        $setting->setPrefix($this->getPrefix());
        $setting->setOptions([
            'label' => $setting->getOption('label', ucfirst($setting->getBaseName())),
            'placeholder' => $setting->getOption('placeholder', $setting->getBaseName())
        ]);

        $attributes = array_merge([
            'class' => 'regular-text'
        ], $setting->getAttributes());
        $setting->setAttributes($attributes);

        return $setting;
    }