diff --git a/bootstrap.services.yml b/bootstrap.services.yml
new file mode 100644
index 0000000..5bd20dd
--- /dev/null
+++ b/bootstrap.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\bootstrap\Hook\BootstrapHooks:
+    class: Drupal\bootstrap\Hook\BootstrapHooks
+    autowire: true
diff --git a/bootstrap.theme b/bootstrap.theme
index 6b5bcf4..ce6b68d 100644
--- a/bootstrap.theme
+++ b/bootstrap.theme
@@ -5,666 +5,182 @@
  * Functions to support theming in the Bootstrap theme.
  */
 
-use Drupal\Core\Template\Attribute;
-use Drupal\Core\Link;
-use Drupal\Component\Utility\Html;
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\bootstrap\Hook\BootstrapHooks;
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\ThemeSettingsProvider;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Component\Utility\Xss;
-use Drupal\node\Entity\Node;
-use Drupal\Component\Render\MarkupInterface;
 
 /**
  * Implements hook_preprocess_HOOK() for HTML document templates.
  *
  * Adds body classes if certain regions have content.
  */
+#[LegacyHook]
 function bootstrap_preprocess_html(&$variables) {
-  if (!isset($variables['attributes']['class'])) {
-    $variables['attributes']['class'] = [];
-  }
-
-  // Color settings
-  if (theme_get_setting('bootstrap_enable_color')) {
-    $variables['#attached']['library'][] = 'bootstrap/colors';
-    // CSS variables
-    $gray200 = '#e9ecef';
-    $gray800 = '#343a40';
-    $white = '#fff';
-    $pc = theme_get_setting('bootstrap_base_primary_color') ?? '#2F3C7E';
-    $pcrgb = _hex2rgb( $pc );
-    $pcd = _color_luminance($pc, -0.15);
-    $bc = '#000';
-    $pct = _getContrastColor($pc, $white, $bc);
-    $sc = theme_get_setting('bootstrap_base_secondary_color') ?? '#FBEAEB';
-    $scrgb = _hex2rgb( $sc );
-    $scd = _color_luminance($sc, -0.15);
-    $sct = _getContrastColor($sc, $white, $gray800);
-    $colors = [
-      'white' => $white,
-      'black' => '#000',
-      'gray-200' => $gray200,
-      'gray-800' => $gray800,
-      'primary' => $pc,
-      'secondary' => $sc,
-    ];
-    $color = _get_color(theme_get_setting('bootstrap_body_color') ?? 'gray-800', $colors);
-    $colors['base'] = $color;
-    $bg = _get_color(theme_get_setting('bootstrap_body_bg_color') ?? 'white', $colors);
-    $h1 = _get_color(theme_get_setting('bootstrap_h1_color') ?? 'base', $colors);
-    $h2 = _get_color(theme_get_setting('bootstrap_h2_color') ?? 'base', $colors);
-    $h3 = _get_color(theme_get_setting('bootstrap_h3_color') ?? 'base', $colors);
-    $styles = [
-      "--bs-primary:$pc;",
-      "--bb-primary-dark:$pcd;",
-      "--bb-primary-light:$pct;",
-      "--bs-primary-rgb:$pcrgb;",
-      "--bs-secondary:$sc;",
-      "--bb-secondary-dark:$scd;",
-      "--bs-secondary-rgb:$scrgb;",
-      "--bs-link-color:$pc;",
-      "--bs-link-hover-color:$pcd;",
-      "--bs-body-color:$color;",
-      "--bs-body-bg:$bg;",
-      "--bb-h1-color:$h1;",
-      "--bb-h2-color:$h2;",
-      "--bb-h3-color:$h3;",
-    ];
-    $variables['html_attributes']->setAttribute('style', implode('', $styles));
-  }
-
-  // Add information about the number of sidebars.
-  if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
-    $variables['attributes']['class'][] = 'layout-two-sidebars';
-  }
-  elseif (!empty($variables['page']['sidebar_first'])) {
-    $variables['attributes']['class'][] = 'layout-one-sidebar';
-    $variables['attributes']['class'][] = 'layout-sidebar-first';
-  }
-  elseif (!empty($variables['page']['sidebar_second'])) {
-    $variables['attributes']['class'][] = 'layout-one-sidebar';
-    $variables['attributes']['class'][] = 'layout-sidebar-second';
-  }
-  else {
-    $variables['attributes']['class'][] = 'layout-no-sidebars';
-  }
-
-  if (!empty($variables['page']['featured_top'])) {
-    $variables['attributes']['class'][] = 'has-featured-top';
-  }
-
-  // Scroll Spy info added to body.
-  if ($scroll_spy = theme_get_setting('bootstrap_scroll_spy')) {
-    $variables['attributes']['data-bs-target'] = $scroll_spy;
-    $variables['attributes']['data-bs-spy'] = "scroll";
-  }
-
-  // Page specific info.
-  $variables['path_info']['args'] = FALSE;
-  $path = \Drupal::service('path.current')->getPath();
-  $path = ltrim($path, '/');
-  $path_args = explode('/', $path);
-  if (isset($path_args[0]) && isset($path_args[1]) && ($path_args[0] == 'node') && (is_numeric($path_args[1]))) {
-    $variables['attributes']['class'][] = 'page-node-' . $path_args[1];
-  }
-  if (isset($path_args[0]) && isset($path_args[1]) && ($path_args[0] == 'user')) {
-    $variables['attributes']['class'][] = 'page-user-' . $path_args[1];
-  }
-  if (isset($path_args[0]) && isset($path_args[1]) && isset($path_args[2]) &&
-    $path_args[0] == 'taxonomy' && $path_args[1] == 'term') {
-    $variables['attributes']['class'][] = 'page-taxonomy-term-' . $path_args[2];
-    $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($path_args[2]);
-    if (!empty($term)) {
-      $vocabulary_id = $term->bundle();
-      $variables['attributes']['class'][] = 'page-vocabulary-' . Html::cleanCssIdentifier($vocabulary_id);
-    }
-  }
-  $view_id = \Drupal::routeMatch()->getParameter('view_id');
-  if ($view_id) {
-    $variables['attributes']['class'][] = 'page-view-' . Html::cleanCssIdentifier($view_id);
-  }
-
-  // SEO Information.
-  $http_equiv = [
-    '#type' => 'html_tag',
-    '#tag' => 'meta',
-    '#attributes' => [
-      'http-equiv' => 'x-ua-compatible',
-      'content' => 'ie=edge',
-    ],
-  ];
-  $variables['page']['#attached']['html_head'][] = [$http_equiv, 'http-equiv'];
-
+  \Drupal::service(BootstrapHooks::class)->preprocessHtml($variables);
 }
 
 /**
  * Implements hook_page_attachments_alter() for page templates.
  */
+#[LegacyHook]
 function bootstrap_page_attachments_alter(&$page) {
-  $viewport = [
-    '#type' => 'html_tag',
-    '#tag' => 'meta',
-    '#attributes' => [
-      'name' => 'viewport',
-      'content' => 'width=device-width, initial-scale=1, shrink-to-fit=no',
-    ],
-  ];
-  $page['#attached']['html_head'][] = [$viewport, 'viewport'];
+  \Drupal::service(BootstrapHooks::class)->pageAttachmentsAlter($page);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for page templates.
  */
+#[LegacyHook]
 function bootstrap_preprocess_page(&$variables) {
-  $source = theme_get_setting('bootstrap_source');
-  if ($source) {
-    $variables['#attached']['library'][] = $source;
-  }
-
-  $img_fluid = theme_get_setting('bootstrap_image_fluid');
-  if ($img_fluid) {
-    $variables['#attached']['library'][] = 'bootstrap/image_fluid';
-  }
-
-  $flyout = theme_get_setting('bootstrap_navbar_flyout');
-  if ($flyout) {
-    $variables['#attached']['library'][] = 'bootstrap/navigation';
-  }
-
-  $slide = theme_get_setting('bootstrap_navbar_slide');
-  if ($slide) {
-    $variables['#attached']['library'][] = 'bootstrap/slide_nav';
-  }
-
-  switch (theme_get_setting('bootstrap_tabs_style')) {
-    case 'full':
-      $variables['#attached']['library'][] = 'bootstrap/tabs_full';
-      break;
-  }
-
-  $fonts = theme_get_setting('bootstrap_google_fonts');
-  if ($fonts) {
-    $variables['#attached']['library'][] = 'bootstrap/' . $fonts;
-  }
-
-  $icons = theme_get_setting('bootstrap_bootstrap_icons');
-  if ($icons) {
-    $variables['#attached']['library'][] = 'bootstrap/bootstrap-icons';
-  }
-
-  $icons = theme_get_setting('bootstrap_icons');
-  if ($icons) {
-    $variables['#attached']['library'][] = 'bootstrap/' . $icons;
-  }
-
-  $system_messages = theme_get_setting('bootstrap_system_messages');
-  if ($system_messages) {
-    $variables['#attached']['library'][] = 'bootstrap/' . $system_messages;
-  }
-
-  $content_width = 'col';
-  $sidebar_first_width = 'col-md-' . theme_get_setting('bootstrap_sidebar_first_width');
-  $sidebar_second_width = 'col-md-' . theme_get_setting('bootstrap_sidebar_second_width');
-
-  // Define default classes for containers.
-  $variables['navbar_top_attributes'] = [
-    'class' => ['navbar'],
-    'id' => ['navbar-top'],
-  ];
-  $variables['navbar_attributes'] = [
-    'class' => ['navbar'],
-    'id' => ['navbar-main'],
-  ];
-  $variables['content_attributes'] = [
-    'class' => ['main-content', $content_width],
-    'id' => ['content'],
-    'role' => ['main'],
-  ];
-  $variables['sidebar_first_attributes'] = [
-    'class' => ['sidebar_first', 'sidebar', $sidebar_first_width],
-    'id' => ['sidebar_first'],
-  ];
-  $variables['sidebar_second_attributes'] = [
-    'class' => ['sidebar_second', 'sidebar', $sidebar_second_width],
-    'id' => ['sidebar_second'],
-  ];
-
-  // Get custom Navbar classes from config and add them to Navbars.
-  if (theme_get_setting('bootstrap_navbar_top_class') !== NULL) {
-    $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_navbar_top_class');
-  }
-  if (theme_get_setting('bootstrap_navbar_class') !== NULL) {
-    $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_navbar_class');
-  }
-
-  switch (theme_get_setting('bootstrap_navbar_offcanvas')) {
-    case 'offcanvas-collapse':
-      $variables['navbar_offcanvas'] = TRUE;
-      $variables['navbar_collapse_class'] = "offcanvas offcanvas-end";
-      $variables['navbar_collapse_btn_data'] = "offcanvas";
-      break;
-    default:
-      $variables['navbar_offcanvas'] = FALSE;
-      $variables['navbar_collapse_class'] = 'collapse navbar-collapse justify-content-end';
-      $variables['navbar_collapse_btn_data'] = "collapse";
-  }
-
-  // Affix.
-  $affix_navbar_top = theme_get_setting('bootstrap_navbar_top_affix');
-  $affix_navbar = theme_get_setting('bootstrap_navbar_affix');
-  $affix_sidebar_first = theme_get_setting('bootstrap_sidebar_first_affix');
-  $affix_sidebar_second = theme_get_setting('bootstrap_sidebar_second_affix');
-  if ($affix_navbar_top || $affix_navbar || $affix_sidebar_first || $affix_sidebar_second) {
-    $variables['#attached']['library'][] = 'bootstrap/affix';
-    if ($affix_navbar_top) {
-      $variables['navbar_top_attributes']['data-toggle'] = 'affix';
-    }
-    if ($affix_navbar) {
-      $variables['navbar_attributes']['data-toggle'] = 'affix';
-    }
-    if ($affix_sidebar_first) {
-      $variables['sidebar_first_attributes']['data-toggle'] = 'affix';
-    }
-    if ($affix_sidebar_second) {
-      $variables['sidebar_second_attributes']['data-toggle'] = 'affix';
-    }
-  }
-
-  // Calculate widths.
-  if (theme_get_setting('bootstrap_content_offset')) {
-    $variables['content_attributes']['class'][] = 'offset-md-' . theme_get_setting('bootstrap_content_offset');
-  }
-  if (theme_get_setting('bootstrap_sidebar_first_offset')) {
-    $variables['sidebar_first_attributes']['class'][] = 'offset-md-' . theme_get_setting('bootstrap_sidebar_first_offset');
-  }
-  if (theme_get_setting('bootstrap_sidebar_second_offset')) {
-    $variables['sidebar_second_attributes']['class'][] = 'offset-md-' . theme_get_setting('bootstrap_sidebar_second_offset');
-  }
-
-  // Define column layout classes.
-  switch (theme_get_setting('bootstrap_sidebar_position')) {
-    case 'left':
-      $variables['sidebar_first_attributes']['class'][] = 'order-first';
-      $variables['content_attributes']['class'][] = 'order-last';
-      break;
-
-    case 'both':
-      $variables['sidebar_first_attributes']['class'][] = 'order-first';
-      $variables['sidebar_second_attributes']['class'][] = 'order-last';
-      break;
-
-    case 'right':
-      $variables['content_attributes']['class'][] = 'order-first';
-      $variables['sidebar_second_attributes']['class'][] = 'order-last';
-      break;
-  }
-
-  // Define navigation position.
-  $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_navbar_top_position');
-  $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_navbar_position');
-
-  // Define navigation color scheme.
-  $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_navbar_top_color');
-  $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_navbar_color');
-
-  // Define navigation background classes.
-  $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_navbar_top_background');
-  $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_navbar_background');
-
-  // Define navigation toggle size.
-  switch (theme_get_setting('bootstrap_navbar_toggle')) {
-    case 'navbar-toggleable-xl':
-      $variables['navbar_attributes']['class'][] = 'navbar-expand-xl';
-      break;
-
-    case 'navbar-toggleable-lg':
-      $variables['navbar_attributes']['class'][] = 'navbar-expand-lg';
-      break;
-
-    case 'navbar-toggleable-md':
-      $variables['navbar_attributes']['class'][] = 'navbar-expand-md';
-      break;
-
-    case 'navbar-toggleable-sm':
-      $variables['navbar_attributes']['class'][] = 'navbar-expand-sm';
-      break;
-
-    case 'navbar-toggleable-xs':
-      $variables['navbar_attributes']['class'][] = 'navbar-expand-xs';
-      break;
-
-    case 'navbar-toggleable-all':
-      $variables['navbar_attributes']['class'][] = '';
-      break;
-
-    default:
-      $variables['navbar_attributes']['class'][] = 'navbar-expand-md';
-      break;
-  }
-
-  if (theme_get_setting('bootstrap_sidebar_collapse')) {
-    $variables['content_attributes']['class'][] = 'sidebar-offcanvas';
-    $variables['sidebar_collapse'] = TRUE;
-    $variables['#attached']['library'][] = 'bootstrap/sidebar_collapse';
-  }
-
-  // Declare region attributes.
-  $variables['navbar_top_attributes'] = new Attribute($variables['navbar_top_attributes']);
-  $variables['navbar_attributes'] = new Attribute($variables['navbar_attributes']);
-  $variables['content_attributes'] = new Attribute($variables['content_attributes']);
-  $variables['sidebar_first_attributes'] = new Attribute($variables['sidebar_first_attributes']);
-  $variables['sidebar_second_attributes'] = new Attribute($variables['sidebar_second_attributes']);
-
-  // Declare container layout.
-  $variables['container_navbar'] = theme_get_setting('bootstrap_navbar_container');
-  $variables['container'] = theme_get_setting('bootstrap_container') ??
-    (theme_get_setting('bootstrap_fluid_container') ? 'container-fluid' : 'container');
+  \Drupal::service(BootstrapHooks::class)->preprocessPage($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for page templates.
  */
+#[LegacyHook]
 function bootstrap_preprocess_page_title(&$variables) {
-  // Since the title and the shortcut link are both block level elements,
-  // positioning them next to each other is much simpler with a wrapper div.
-  if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
-    // Add a wrapper div using the title_prefix and title_suffix render
-    // elements.
-    $variables['title_prefix']['shortcut_wrapper'] = [
-      '#markup' => '<div class="shortcut-wrapper clearfix">',
-      '#weight' => 100,
-    ];
-    $variables['title_suffix']['shortcut_wrapper'] = [
-      '#markup' => '</div>',
-      '#weight' => -99,
-    ];
-    // Make sure the shortcut link is the first item in title_suffix.
-    $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessPageTitle($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_maintenance_page(&$variables) {
-  // By default, site_name is set to Drupal if no db connection is available
-  // or during site installation. Setting site_name to an empty string makes
-  // the site and update pages look cleaner.
-  // @see template_preprocess_maintenance_page
-  if (!$variables['db_is_active']) {
-    $variables['site_name'] = '';
-  }
-
-  // Bootstrap has custom styling for the maintenance page.
-  $variables['#attached']['library'][] = 'bootstrap/maintenance_page';
+  \Drupal::service(BootstrapHooks::class)->preprocessMaintenancePage($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for node.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_node(&$variables) {
-  // Remove the "Add new comment" link on teasers or when the comment form is
-  // displayed on the page.
-  if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) {
-    unset($variables['content']['links']['comment']['#links']['comment-add']);
-  }
-  // Hide label on all nodes
-  if (theme_get_setting('bootstrap_hide_node_label') != NULL) {
-    unset($variables['label']);
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessNode($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for region.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_region(&$variables) {
-  $nowrap = [
-    'breadcrumb',
-    'highlighted',
-    'content',
-    'primary_menu',
-    'header',
-    'sidebar_first',
-    'sidebar_second',
-  ];
-  if (theme_get_setting('bootstrap_region_class_' . $variables['elements']['#region']) !== NULL) {
-    $variables['attributes']['class'][] = theme_get_setting('bootstrap_region_class_' . $variables['elements']['#region']);
-  }
-  elseif (!in_array($variables['elements']['#region'], $nowrap)) {
-    $variables['attributes']['class'][] = 'row';
-  }
-  if (theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region']) !== NULL) {
-    $variables['clean'] = theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region']);
-  }
-  else {
-    $variables['clean'] = FALSE;
-  }
-  $variables['container'] = theme_get_setting('bootstrap_container') ??
-    (theme_get_setting('bootstrap_fluid_container') ? 'container-fluid' : 'container');
-
+  \Drupal::service(BootstrapHooks::class)->preprocessRegion($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for block.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_block(&$variables) {
-  if ($variables['base_plugin_id'] == 'system_menu_block' && isset($variables['attributes']['id'])) {
-    $variables['content']['#attributes']['id'] = $variables['attributes']['id'];
-  }
-  // Add a clearfix class to system branding blocks.
-  if ($variables['plugin_id'] == 'system_branding_block') {
-    $variables['attributes']['class'][] = 'clearfix';
-  }
-  $block = $variables['elements'];
-  if (!empty($block['#configuration']['provider']) && $block['#configuration']['provider'] == "block_content") {
-    if (isset($block['content']['#block_content']) && ($block['content']['#block_content'] !== null)) {
-      $bundle = $block['content']['#block_content']->bundle();
-      $variables['attributes']['class'][] = 'block-content-' . $bundle;
-    }
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessBlock($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for form elements.
  */
+#[LegacyHook]
 function bootstrap_preprocess_form_element(&$variables) {
-  if (isset($variables['label']['#title'])) {
-    if (is_object($variables['label']['#title']) && !$variables['label']['#title'] instanceof MarkupInterface) {
-      $variables['input_title'] = NULL;
-    }
-    elseif (is_object($variables['label']['#title'])) {
-      $variables['input_title'] = $variables['label']['#title'];
-    }
-    else {
-      $variables['input_title'] = $variables['label']['#title'];
-    }
-  }
-
-  if (theme_get_setting('bootstrap_float_label') &&
-        $variables['element']['#type'] != 'radio' &&
-        $variables['element']['#type'] != 'checkbox' &&
-        $variables['element']['#type'] != 'date' &&
-        $variables['element']['#type'] != 'time' &&
-        $variables['element']['#type'] != 'search' &&
-        $variables['element']['#type'] != 'select' &&
-        $variables['element']['#type'] != 'textarea' &&
-        $variables['element']['#type'] != 'managed_file') {
-    $variables['float_label'] = theme_get_setting('bootstrap_float_label');
-    $variables['label_display'] = 'after';
-  }
-
-  if (isset($variables['element']['#attributes'])) {
-    $variables['input_attributes'] = new Attribute($variables['element']['#attributes']);
-  }
-
-  if (isset($variables['element']['#type']) && ($variables['element']['#type'] == 'radio' || $variables['element']['#type'] == 'checkbox')) {
-    switch (theme_get_setting('bootstrap_checkbox')) {
-      case 'switch':
-        $variables['checkbox_style'] = 'form-switch';
-        break;
-      case 'button':
-        $variables['checkbox_style'] = 'form-button';
-        break;
-    }
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessFormElement($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for form-element-label.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_form_element_label(&$variables) {
-  $element = $variables['element'];
+  \Drupal::service(BootstrapHooks::class)->preprocessFormElementLabel($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for menu.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_menu(&$variables) {
-  $variables['attributes']['class'][] = 'clearfix';
+  \Drupal::service(BootstrapHooks::class)->preprocessMenu($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for menu-local-task.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_menu_local_task(&$variables) {
-  $link = $variables['element']['#link'];
-  $url = $link['url'];
-  $options = $url->getOptions();
-  $url->setOptions($options + $link['localized_options']);
-  $variables['item'] = Link::fromTextAndUrl($link['title'], $url);
+  \Drupal::service(BootstrapHooks::class)->preprocessMenuLocalTask($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for menu-local-tasks.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_menu_local_tasks(&$variables) {
-  switch (theme_get_setting('bootstrap_tabs_style')) {
-    case 'pills':
-      $variables['nav_style'] = 'nav-pills';
-      break;
-    default:
-      $variables['nav_style'] = 'nav-tabs';
-      break;
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessMenuLocalTasks($variables);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter().
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_menu_alter(array &$suggestions, array $variables) {
-  // Taken from http://kristiankaa.dk/article/drupal8-region-specific-menu-theme-hook-suggestion
-  // bootstrap_preprocess_block(&$variables)
-  if (isset($variables['attributes']['block'])) {
-    $hook = str_replace(['block-', '-'], ['', '_'], $variables['attributes']['block']);
-    $suggestions[] = $variables['theme_hook_original'] . '__' . $hook;
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsMenuAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for menu-local-action.html.twig.
  */
+#[LegacyHook]
 function bootstrap_preprocess_menu_local_action(&$variables) {
-  $link = $variables['element']['#link'];
-  $link += [
-    'localized_options' => [],
-  ];
-  $link['localized_options']['attributes']['class'][] = 'btn';
-  $link['localized_options']['attributes']['class'][] = 'btn-secondary';
-  $link['localized_options']['set_active_class'] = TRUE;
-  $variables['link'] = [
-    '#type' => 'link',
-    '#title' => $link['title'],
-    '#options' => $link['localized_options'],
-    '#url' => $link['url'],
-  ];
+  \Drupal::service(BootstrapHooks::class)->preprocessMenuLocalAction($variables);
 }
 
 /**
  * Implements template_preprocess_table()
  */
 function bootstrap_preprocess_table(&$variables) {
-  $variables['table_class'] = theme_get_setting('bootstrap_table_style');
-  $variables['hover'] = theme_get_setting('bootstrap_table_hover');
-  $variables['thead_class'] = theme_get_setting('bootstrap_table_head');
+  $variables['table_class'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_style'), fn() => theme_get_setting('bootstrap_table_style'));
+  $variables['hover'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_hover'), fn() => theme_get_setting('bootstrap_table_hover'));
+  $variables['thead_class'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_head'), fn() => theme_get_setting('bootstrap_table_head'));
 }
 
 /**
  * Implements template_preprocess_views_view_table()
  */
 function bootstrap_preprocess_views_view_table(&$variables) {
-  $variables['table_class'] = theme_get_setting('bootstrap_table_style');
-  $variables['hover'] = theme_get_setting('bootstrap_table_hover');
-  $variables['thead_class'] = theme_get_setting('bootstrap_table_head');
+  $variables['table_class'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_style'), fn() => theme_get_setting('bootstrap_table_style'));
+  $variables['hover'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_hover'), fn() => theme_get_setting('bootstrap_table_hover'));
+  $variables['thead_class'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_head'), fn() => theme_get_setting('bootstrap_table_head'));
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter() for region templates.
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_region_alter(array &$suggestions, array $variables) {
-  $nowrap = [
-    'breadcrumb',
-    'highlighted',
-    'content',
-    'primary_menu',
-    'header',
-    'sidebar_first',
-    'sidebar_second',
-  ];
-  if (theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region']) !== NULL) {
-    $region_clean = theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region']);
-  }
-  else {
-    $region_clean = in_array($variables['elements']['#region'], $nowrap);
-  }
-  $region_width = theme_get_setting('bootstrap_region_width_' . $variables['elements']['#region']);
-
-  if ($region_width) {
-    $suggestions[] = 'region__full_width';
-  }
-  elseif ($region_clean) {
-    $suggestions[] = 'region__nowrap';
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsRegionAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter().
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_block_alter(array &$suggestions, array $variables) {
-  $block = $variables['elements'];
-  if (!empty($block['#configuration']['provider']) && $block['#configuration']['provider'] == "block_content") {
-    if (isset($block['content']['#block_content']) && ($block['content']['#block_content'] !== null)) {
-      $bundle = $block['content']['#block_content']->bundle();
-      array_splice($suggestions, 2, 0, 'block__block_' . $bundle);
-    }
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsBlockAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter().
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_user_alter(array &$suggestions, array $variables, $hook) {
-  // Define the view mode.
-  $sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
-  $user_id = \Drupal::service('current_user')->id();
-  $suggestions[] = 'user__' . $sanitized_view_mode;
-  $suggestions[] = 'user__' . $user_id;
-  $suggestions[] = 'user__' . $user_id . '__' . $sanitized_view_mode;
-
-  return $suggestions;
+  return \Drupal::service(BootstrapHooks::class)->themeSuggestionsUserAlter($suggestions, $variables, $hook);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter() for page template.
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_page_alter(array &$suggestions, array $variables) {
-  // Add a template suggestions for node type.
-  /** @var \Drupal\node\NodeInterface $node */
-  if ($node = \Drupal::routeMatch()->getParameter('node')) {
-    if (is_numeric($node)) {
-      $node = Node::load($node);
-    }
-
-    $suggestions[] = 'page__node__' . $node->bundle();
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsPageAlter($suggestions, $variables);
 }
 
 /**
@@ -677,190 +193,80 @@ function bootstrap_form_node_form_alter(&$form, FormStateInterface $form_state)
 /**
  * Implements hook_theme_suggestions_HOOK_alter() for links templates.
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_links_alter(array &$suggestions, array $variables) {
-  // ToDo get from core a variable to flag inline links.
-  if (isset($variables['attributes']['class'])) {
-    if (in_array('inline', $variables['attributes']['class'])) {
-      $suggestions[] = 'links__inline';
-    }
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsLinksAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter() for status messages templates.
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_status_messages_alter(array &$suggestions, array $variables) {
-  switch (theme_get_setting('bootstrap_messages_widget')) {
-    case 'toasts':
-      $suggestions[] = 'status_messages__toasts';
-      break;
-    case 'alerts':
-      $suggestions[] = 'status_messages__alerts';
-      break;
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsStatusMessagesAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for breadcrumb.
  */
+#[LegacyHook]
 function bootstrap_preprocess_breadcrumb(&$variables) {
-  if (theme_get_setting('bootstrap_breadcrumb_divider') && theme_get_setting('bootstrap_breadcrumb_divider') != '') {
-    $variables['breadcrumb_divider'] = sprintf("--bs-breadcrumb-divider: '%s';", theme_get_setting('bootstrap_breadcrumb_divider'));
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessBreadcrumb($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for status_messages.
  */
+#[LegacyHook]
 function bootstrap_preprocess_status_messages(&$variables) {
-  $variables['title_ids'] = [];
-  if (is_array($variables['message_list'])) {
-    foreach ($variables['message_list'] as $message_type => $messages) {
-      $variables['title_ids'][$message_type] = Html::getUniqueId("message-$message_type-title");
-    }
-  }
-
-  if (theme_get_setting('bootstrap_messages_widget') === 'toasts') {
-    $variables['attributes']['data-bs-delay'] = theme_get_setting('bootstrap_messages_widget_toast_delay') ?? 10000;
-  }
-
+  \Drupal::service(BootstrapHooks::class)->preprocessStatusMessages($variables);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter() for form templates.
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_form_alter(array &$suggestions, array $variables) {
-  if ($variables['element']['#form_id'] == 'search_block_form') {
-    $suggestions[] = 'form__search_block_form';
-  }
-  if ($variables['element']['#form_id'] == 'node_form') {
-    $suggestions[] = 'node_edit_form';
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsFormAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter() for form templates.
  */
+#[LegacyHook]
 function bootstrap_theme_suggestions_input_alter(array &$suggestions, array $variables) {
-  if ($variables['element']['#type'] == 'submit' && theme_get_setting('bootstrap_button')) {
-    $suggestions[] = 'input__submit_button';
-  }
+  \Drupal::service(BootstrapHooks::class)->themeSuggestionsInputAlter($suggestions, $variables);
 }
 
 /**
  * Implements hook_preprocess().
  */
+#[LegacyHook]
 function bootstrap_preprocess(&$variables, $hook) {
-  if (is_array($variables['attributes'] ?? NULL) && isset($variables['attributes']['class'])) {
-    $class = 'is-invalid';
-
-    if (is_object($variables['attributes']['class'])) {
-      if (in_array('error', $variables['attributes']['class']->value())) {
-        $variables['attributes']->addClass($class);
-        // If there is a wrapper, add class too.
-        if (isset($variables["wrapper_attributes"])) {
-          $variables['wrapper_attributes']->addClass($class);
-        }
-      }
-    }
-    elseif (is_array($variables['attributes']['class'])) {
-      if (in_array('error', $variables['attributes']['class'])) {
-        $variables['attributes']['class'][] = $class;
-      }
-    }
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocess($variables, $hook);
 }
 
 /**
  * Implements hook_preprocess_input() for adding classes to inputs.
  */
+#[LegacyHook]
 function bootstrap_preprocess_input(&$variables) {
-  if ($variables['element']['#type'] == 'submit') {
-    $button_size = theme_get_setting('bootstrap_button_size');
-    $button_types = [
-      'btn-primary',
-      'btn-secondary',
-      'btn-success',
-      'btn-warning',
-      'btn-danger',
-      'btn-link',
-    ];
-    $button_sizes = ['btn-sm', 'btn-lg'];
-    $button_is_outline = theme_get_setting('bootstrap_button_outline');
-    $button_type = theme_get_setting('bootstrap_button_type') ?? 'primary';
-    if (is_object($variables['attributes']['class'])) {
-      \Drupal::logger('bootstrap')->notice(implode($variables['attributes']['class']->value()));
-      if (!in_array('btn', $variables['attributes']['class']->value())) {
-        $variables['attributes']['class']->addClass('btn');
-      }
-      if (empty(array_intersect($button_types, $variables['attributes']['class']->value()))) {
-        if ($button_is_outline) {
-          $variables['attributes']['class']->addClass('btn-outline-' . $button_type);
-        }
-        else {
-          $variables['attributes']['class']->addClass('btn-' . $button_type);
-        }
-      }
-      if ($button_size && empty(array_intersect($button_sizes, $variables['attributes']['class']->value()))) {
-        $variables['attributes']['class']->addClass($button_size);
-      }
-    }
-    else {
-      if (!in_array('btn', $variables['attributes']['class'])) {
-        $variables['attributes']['class'][] = 'btn';
-      }
-      if (empty(array_intersect($button_types, $variables['attributes']['class']))) {
-        if ($button_is_outline) {
-          $variables['attributes']['class'][] = 'btn-outline-' . $button_type;
-        }
-        else {
-          $variables['attributes']['class'][] = 'btn-' . $button_type;
-        }
-      }
-      if ($button_size && empty(array_intersect($button_sizes, $variables['attributes']['class']))) {
-        $variables['attributes']['class'][] = $button_size;
-      }
-      $variables['attributes'] = new Attribute($variables['attributes']);
-    }
-    $variables['safe_value_label'] = Xss::filter($variables['attributes']['value'] ?? '');
-  }
-  if ($variables['element']['#type'] != 'radio' &&
-    $variables['element']['#type'] != 'checkbox' &&
-    $variables['element']['#type'] != 'date' &&
-    $variables['element']['#type'] != 'time' &&
-    $variables['element']['#type'] != 'managed_file' &&
-    $variables['element']['#type'] != 'select' &&
-    $variables['element']['#type'] != 'search' &&
-    $variables['element']['#type'] != 'textarea' &&
-    theme_get_setting('bootstrap_float_label') &&
-    !isset($variables['attributes']['placeholder'])) {
-      $variables['attributes']['placeholder'] = isset($variables['element']['#title']) ? $variables['element']['#title'] : '';
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessInput($variables);
 }
 
 /**
  * Implements hook_preprocess_select() for adding classes to select boxes.
  */
+#[LegacyHook]
 function bootstrap_preprocess_select(&$variables) {
-  if (isset($variables['attributes']['class'])) {
-    if (is_object($variables['attributes']['class'])) {
-      if (in_array('error', $variables['attributes']['class']->value())) {
-        $variables['attributes']['class']->addClass('is-invalid');
-      }
-    }
-    elseif (is_array($variables['attributes']['class'])) {
-      if (in_array('error', $variables['attributes']['class'])) {
-        $variables['attributes']['class'][] = 'is-invalid';
-      }
-    }
-  }
+  \Drupal::service(BootstrapHooks::class)->preprocessSelect($variables);
 }
 
 /**
  * Covert hex to rgb color.
  */
-function _hex2rgb( $color ) {
-  list($r, $g, $b) = sscanf($color, "#%02x%02x%02x");
+function _hex2rgb($color) {
+  [$r, $g, $b] = sscanf($color, "#%02x%02x%02x");
   $output = "$r, $g, $b";
   return $output;
 }
@@ -868,46 +274,53 @@ function _hex2rgb( $color ) {
 /**
  * Covert hex to rgba color.
  */
-function _hex2rgba( $color, $opacity ) {
-  list($r, $g, $b) = sscanf($color, "#%02x%02x%02x");
+function _hex2rgba($color, $opacity) {
+  [$r, $g, $b] = sscanf($color, "#%02x%02x%02x");
   $output = "rgba($r, $g, $b, $opacity)";
   return $output;
 }
 
 /**
- * Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7
- * @param str $hex Colour as hexadecimal (with or without hash);
+ * Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7.
+ *
+ * @param string $hex
+ *   Colour as hexadecimal (with or without hash);.
+ *
  * @percent float $percent Decimal ( 0.2 = lighten by 20%(), -0.4 = darken by 40%() )
+ *
  * @return str Lightened/Darkend colour as hexadecimal (with hash);
- * https://gist.github.com/stephenharris/5532899
+ *   https://gist.github.com/stephenharris/5532899
  */
-function _color_luminance( $hex, $percent ) {
-  $hex = preg_replace( '/[^0-9a-f]/i', '', $hex );
+function _color_luminance($hex, $percent) {
+  $hex = preg_replace('/[^0-9a-f]/i', '', $hex);
   $new_hex = '#';
-  if ($hex !== null && strlen($hex) < 6) {
+  if ($hex !== NULL && strlen($hex) < 6) {
     $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
   }
   for ($i = 0; $i < 3; $i++) {
-    $dec = hexdec( substr( $hex, $i*2, 2 ) );
-    $dec = min( max( 0, $dec + intval($dec * $percent) ), 255 );
-    $new_hex .= str_pad( dechex( intval($dec) ) , 2, 0, STR_PAD_LEFT );
+    $dec = hexdec(substr($hex, $i * 2, 2));
+    $dec = min(max(0, $dec + intval($dec * $percent)), 255);
+    $new_hex .= str_pad(dechex(intval($dec)), 2, 0, STR_PAD_LEFT);
   }
   return $new_hex;
 }
 
+/**
+ *
+ */
 function _getContrastColor($hexColor, $white = '#fff', $dark = '#000') {
-  // hexColor RGB
+  // hexColor RGB.
   $R1 = hexdec(substr($hexColor, 1, 2));
   $G1 = hexdec(substr($hexColor, 3, 2));
   $B1 = hexdec(substr($hexColor, 5, 2));
 
-  // Black RGB
+  // Black RGB.
   $blackColor = "#000000";
   $R2BlackColor = hexdec(substr($blackColor, 1, 2));
   $G2BlackColor = hexdec(substr($blackColor, 3, 2));
   $B2BlackColor = hexdec(substr($blackColor, 5, 2));
 
-  // Calc contrast ratio
+  // Calc contrast ratio.
   $L1 = 0.2126 * pow($R1 / 255, 2.2) +
         0.7152 * pow($G1 / 255, 2.2) +
         0.0722 * pow($B1 / 255, 2.2);
@@ -918,20 +331,25 @@ function _getContrastColor($hexColor, $white = '#fff', $dark = '#000') {
 
   $contrastRatio = 0;
   if ($L1 > $L2) {
-    $contrastRatio = (int)(($L1 + 0.05) / ($L2 + 0.05));
-  } else {
-    $contrastRatio = (int)(($L2 + 0.05) / ($L1 + 0.05));
+    $contrastRatio = (int) (($L1 + 0.05) / ($L2 + 0.05));
+  }
+  else {
+    $contrastRatio = (int) (($L2 + 0.05) / ($L1 + 0.05));
   }
 
-  // If contrast is more than 5, return black color
+  // If contrast is more than 5, return black color.
   if ($contrastRatio > 5) {
-     return $dark;
-  } else {
-    // if not, return white color.
+    return $dark;
+  }
+  else {
+    // If not, return white color.
     return $white;
   }
 }
 
+/**
+ *
+ */
 function _get_color($color, $colors) {
   if (in_array($color, $colors)) {
     return $colors[$color];
diff --git a/src/Hook/BootstrapHooks.php b/src/Hook/BootstrapHooks.php
new file mode 100644
index 0000000..3ea1d6a
--- /dev/null
+++ b/src/Hook/BootstrapHooks.php
@@ -0,0 +1,852 @@
+<?php
+
+namespace Drupal\bootstrap\Hook;
+
+use Drupal\Component\Utility\Xss;
+use Drupal\node\Entity\Node;
+use Drupal\Core\Link;
+use Drupal\Component\Render\MarkupInterface;
+use Drupal\Core\Template\Attribute;
+use Drupal\Component\Utility\Html;
+use Drupal\Core\Extension\ThemeSettingsProvider;
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for bootstrap.
+ */
+class BootstrapHooks {
+
+  /**
+   * Implements hook_preprocess_HOOK() for HTML document templates.
+   *
+   * Adds body classes if certain regions have content.
+   */
+  #[Hook('preprocess_html')]
+  public function preprocessHtml(&$variables) {
+    if (!isset($variables['attributes']['class'])) {
+      $variables['attributes']['class'] = [];
+    }
+    // Color settings.
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_enable_color'), fn() => theme_get_setting('bootstrap_enable_color'))) {
+      $variables['#attached']['library'][] = 'bootstrap/colors';
+      // CSS variables.
+      $gray200 = '#e9ecef';
+      $gray800 = '#343a40';
+      $white = '#fff';
+      $pc = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_base_primary_color'), fn() => theme_get_setting('bootstrap_base_primary_color')) ?? '#2F3C7E';
+      $pcrgb = _hex2rgb($pc);
+      $pcd = _color_luminance($pc, -0.15);
+      $bc = '#000';
+      $pct = _getContrastColor($pc, $white, $bc);
+      $sc = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_base_secondary_color'), fn() => theme_get_setting('bootstrap_base_secondary_color')) ?? '#FBEAEB';
+      $scrgb = _hex2rgb($sc);
+      $scd = _color_luminance($sc, -0.15);
+      $sct = _getContrastColor($sc, $white, $gray800);
+      $colors = [
+        'white' => $white,
+        'black' => '#000',
+        'gray-200' => $gray200,
+        'gray-800' => $gray800,
+        'primary' => $pc,
+        'secondary' => $sc,
+      ];
+      $color = _get_color(DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_body_color'), fn() => theme_get_setting('bootstrap_body_color')) ?? 'gray-800', $colors);
+      $colors['base'] = $color;
+      $bg = _get_color(DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_body_bg_color'), fn() => theme_get_setting('bootstrap_body_bg_color')) ?? 'white', $colors);
+      $h1 = _get_color(DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_h1_color'), fn() => theme_get_setting('bootstrap_h1_color')) ?? 'base', $colors);
+      $h2 = _get_color(DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_h2_color'), fn() => theme_get_setting('bootstrap_h2_color')) ?? 'base', $colors);
+      $h3 = _get_color(DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_h3_color'), fn() => theme_get_setting('bootstrap_h3_color')) ?? 'base', $colors);
+      $styles = [
+        "--bs-primary:{$pc};",
+        "--bb-primary-dark:{$pcd};",
+        "--bb-primary-light:{$pct};",
+        "--bs-primary-rgb:{$pcrgb};",
+        "--bs-secondary:{$sc};",
+        "--bb-secondary-dark:{$scd};",
+        "--bs-secondary-rgb:{$scrgb};",
+        "--bs-link-color:{$pc};",
+        "--bs-link-hover-color:{$pcd};",
+        "--bs-body-color:{$color};",
+        "--bs-body-bg:{$bg};",
+        "--bb-h1-color:{$h1};",
+        "--bb-h2-color:{$h2};",
+        "--bb-h3-color:{$h3};",
+      ];
+      $variables['html_attributes']->setAttribute('style', implode('', $styles));
+    }
+    // Add information about the number of sidebars.
+    if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
+      $variables['attributes']['class'][] = 'layout-two-sidebars';
+    }
+    elseif (!empty($variables['page']['sidebar_first'])) {
+      $variables['attributes']['class'][] = 'layout-one-sidebar';
+      $variables['attributes']['class'][] = 'layout-sidebar-first';
+    }
+    elseif (!empty($variables['page']['sidebar_second'])) {
+      $variables['attributes']['class'][] = 'layout-one-sidebar';
+      $variables['attributes']['class'][] = 'layout-sidebar-second';
+    }
+    else {
+      $variables['attributes']['class'][] = 'layout-no-sidebars';
+    }
+    if (!empty($variables['page']['featured_top'])) {
+      $variables['attributes']['class'][] = 'has-featured-top';
+    }
+    // Scroll Spy info added to body.
+    if ($scroll_spy = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_scroll_spy'), fn() => theme_get_setting('bootstrap_scroll_spy'))) {
+      $variables['attributes']['data-bs-target'] = $scroll_spy;
+      $variables['attributes']['data-bs-spy'] = "scroll";
+    }
+    // Page specific info.
+    $variables['path_info']['args'] = FALSE;
+    $path = \Drupal::service('path.current')->getPath();
+    $path = ltrim($path, '/');
+    $path_args = explode('/', $path);
+    if (isset($path_args[0]) && isset($path_args[1]) && $path_args[0] == 'node' && is_numeric($path_args[1])) {
+      $variables['attributes']['class'][] = 'page-node-' . $path_args[1];
+    }
+    if (isset($path_args[0]) && isset($path_args[1]) && $path_args[0] == 'user') {
+      $variables['attributes']['class'][] = 'page-user-' . $path_args[1];
+    }
+    if (isset($path_args[0]) && isset($path_args[1]) && isset($path_args[2]) && $path_args[0] == 'taxonomy' && $path_args[1] == 'term') {
+      $variables['attributes']['class'][] = 'page-taxonomy-term-' . $path_args[2];
+      $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($path_args[2]);
+      if (!empty($term)) {
+        $vocabulary_id = $term->bundle();
+        $variables['attributes']['class'][] = 'page-vocabulary-' . Html::cleanCssIdentifier($vocabulary_id);
+      }
+    }
+    $view_id = \Drupal::routeMatch()->getParameter('view_id');
+    if ($view_id) {
+      $variables['attributes']['class'][] = 'page-view-' . Html::cleanCssIdentifier($view_id);
+    }
+    // SEO Information.
+    $http_equiv = [
+      '#type' => 'html_tag',
+      '#tag' => 'meta',
+      '#attributes' => [
+        'http-equiv' => 'x-ua-compatible',
+        'content' => 'ie=edge',
+      ],
+    ];
+    $variables['page']['#attached']['html_head'][] = [
+      $http_equiv,
+      'http-equiv',
+    ];
+  }
+
+  /**
+   * Implements hook_page_attachments_alter() for page templates.
+   */
+  #[Hook('page_attachments_alter')]
+  public function pageAttachmentsAlter(&$page) {
+    $viewport = [
+      '#type' => 'html_tag',
+      '#tag' => 'meta',
+      '#attributes' => [
+        'name' => 'viewport',
+        'content' => 'width=device-width, initial-scale=1, shrink-to-fit=no',
+      ],
+    ];
+    $page['#attached']['html_head'][] = [
+      $viewport,
+      'viewport',
+    ];
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for page templates.
+   */
+  #[Hook('preprocess_page')]
+  public function preprocessPage(&$variables) {
+    $source = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_source'), fn() => theme_get_setting('bootstrap_source'));
+    if ($source) {
+      $variables['#attached']['library'][] = $source;
+    }
+    $img_fluid = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_image_fluid'), fn() => theme_get_setting('bootstrap_image_fluid'));
+    if ($img_fluid) {
+      $variables['#attached']['library'][] = 'bootstrap/image_fluid';
+    }
+    $flyout = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_flyout'), fn() => theme_get_setting('bootstrap_navbar_flyout'));
+    if ($flyout) {
+      $variables['#attached']['library'][] = 'bootstrap/navigation';
+    }
+    $slide = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_slide'), fn() => theme_get_setting('bootstrap_navbar_slide'));
+    if ($slide) {
+      $variables['#attached']['library'][] = 'bootstrap/slide_nav';
+    }
+    switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_tabs_style'), fn() => theme_get_setting('bootstrap_tabs_style'))) {
+      case 'full':
+        $variables['#attached']['library'][] = 'bootstrap/tabs_full';
+        break;
+    }
+    $fonts = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_google_fonts'), fn() => theme_get_setting('bootstrap_google_fonts'));
+    if ($fonts) {
+      $variables['#attached']['library'][] = 'bootstrap/' . $fonts;
+    }
+    $icons = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_bootstrap_icons'), fn() => theme_get_setting('bootstrap_bootstrap_icons'));
+    if ($icons) {
+      $variables['#attached']['library'][] = 'bootstrap/bootstrap-icons';
+    }
+    $icons = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_icons'), fn() => theme_get_setting('bootstrap_icons'));
+    if ($icons) {
+      $variables['#attached']['library'][] = 'bootstrap/' . $icons;
+    }
+    $system_messages = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_system_messages'), fn() => theme_get_setting('bootstrap_system_messages'));
+    if ($system_messages) {
+      $variables['#attached']['library'][] = 'bootstrap/' . $system_messages;
+    }
+    $content_width = 'col';
+    $sidebar_first_width = 'col-md-' . DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_width'), fn() => theme_get_setting('bootstrap_sidebar_first_width'));
+    $sidebar_second_width = 'col-md-' . DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_width'), fn() => theme_get_setting('bootstrap_sidebar_second_width'));
+    // Define default classes for containers.
+    $variables['navbar_top_attributes'] = [
+      'class' => [
+        'navbar',
+      ],
+      'id' => [
+        'navbar-top',
+      ],
+    ];
+    $variables['navbar_attributes'] = [
+      'class' => [
+        'navbar',
+      ],
+      'id' => [
+        'navbar-main',
+      ],
+    ];
+    $variables['content_attributes'] = [
+      'class' => [
+        'main-content',
+        $content_width,
+      ],
+      'id' => [
+        'content',
+      ],
+      'role' => [
+        'main',
+      ],
+    ];
+    $variables['sidebar_first_attributes'] = [
+      'class' => [
+        'sidebar_first',
+        'sidebar',
+        $sidebar_first_width,
+      ],
+      'id' => [
+        'sidebar_first',
+      ],
+    ];
+    $variables['sidebar_second_attributes'] = [
+      'class' => [
+        'sidebar_second',
+        'sidebar',
+        $sidebar_second_width,
+      ],
+      'id' => [
+        'sidebar_second',
+      ],
+    ];
+    // Get custom Navbar classes from config and add them to Navbars.
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_class'), fn() => theme_get_setting('bootstrap_navbar_top_class')) !== NULL) {
+      $variables['navbar_top_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_class'), fn() => theme_get_setting('bootstrap_navbar_top_class'));
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_class'), fn() => theme_get_setting('bootstrap_navbar_class')) !== NULL) {
+      $variables['navbar_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_class'), fn() => theme_get_setting('bootstrap_navbar_class'));
+    }
+    switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_offcanvas'), fn() => theme_get_setting('bootstrap_navbar_offcanvas'))) {
+      case 'offcanvas-collapse':
+        $variables['navbar_offcanvas'] = TRUE;
+        $variables['navbar_collapse_class'] = "offcanvas offcanvas-end";
+        $variables['navbar_collapse_btn_data'] = "offcanvas";
+        break;
+
+      default:
+        $variables['navbar_offcanvas'] = FALSE;
+        $variables['navbar_collapse_class'] = 'collapse navbar-collapse justify-content-end';
+        $variables['navbar_collapse_btn_data'] = "collapse";
+    }
+    // Affix.
+    $affix_navbar_top = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_affix'), fn() => theme_get_setting('bootstrap_navbar_top_affix'));
+    $affix_navbar = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_affix'), fn() => theme_get_setting('bootstrap_navbar_affix'));
+    $affix_sidebar_first = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_affix'), fn() => theme_get_setting('bootstrap_sidebar_first_affix'));
+    $affix_sidebar_second = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_affix'), fn() => theme_get_setting('bootstrap_sidebar_second_affix'));
+    if ($affix_navbar_top || $affix_navbar || $affix_sidebar_first || $affix_sidebar_second) {
+      $variables['#attached']['library'][] = 'bootstrap/affix';
+      if ($affix_navbar_top) {
+        $variables['navbar_top_attributes']['data-toggle'] = 'affix';
+      }
+      if ($affix_navbar) {
+        $variables['navbar_attributes']['data-toggle'] = 'affix';
+      }
+      if ($affix_sidebar_first) {
+        $variables['sidebar_first_attributes']['data-toggle'] = 'affix';
+      }
+      if ($affix_sidebar_second) {
+        $variables['sidebar_second_attributes']['data-toggle'] = 'affix';
+      }
+    }
+    // Calculate widths.
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_content_offset'), fn() => theme_get_setting('bootstrap_content_offset'))) {
+      $variables['content_attributes']['class'][] = 'offset-md-' . DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_content_offset'), fn() => theme_get_setting('bootstrap_content_offset'));
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_offset'), fn() => theme_get_setting('bootstrap_sidebar_first_offset'))) {
+      $variables['sidebar_first_attributes']['class'][] = 'offset-md-' . DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_offset'), fn() => theme_get_setting('bootstrap_sidebar_first_offset'));
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_offset'), fn() => theme_get_setting('bootstrap_sidebar_second_offset'))) {
+      $variables['sidebar_second_attributes']['class'][] = 'offset-md-' . DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_offset'), fn() => theme_get_setting('bootstrap_sidebar_second_offset'));
+    }
+    // Define column layout classes.
+    switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_position'), fn() => theme_get_setting('bootstrap_sidebar_position'))) {
+      case 'left':
+        $variables['sidebar_first_attributes']['class'][] = 'order-first';
+        $variables['content_attributes']['class'][] = 'order-last';
+        break;
+
+      case 'both':
+        $variables['sidebar_first_attributes']['class'][] = 'order-first';
+        $variables['sidebar_second_attributes']['class'][] = 'order-last';
+        break;
+
+      case 'right':
+        $variables['content_attributes']['class'][] = 'order-first';
+        $variables['sidebar_second_attributes']['class'][] = 'order-last';
+        break;
+    }
+    // Define navigation position.
+    $variables['navbar_top_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_position'), fn() => theme_get_setting('bootstrap_navbar_top_position'));
+    $variables['navbar_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_position'), fn() => theme_get_setting('bootstrap_navbar_position'));
+    // Define navigation color scheme.
+    $variables['navbar_top_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_color'), fn() => theme_get_setting('bootstrap_navbar_top_color'));
+    $variables['navbar_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_color'), fn() => theme_get_setting('bootstrap_navbar_color'));
+    // Define navigation background classes.
+    $variables['navbar_top_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_background'), fn() => theme_get_setting('bootstrap_navbar_top_background'));
+    $variables['navbar_attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_background'), fn() => theme_get_setting('bootstrap_navbar_background'));
+    // Define navigation toggle size.
+    switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_toggle'), fn() => theme_get_setting('bootstrap_navbar_toggle'))) {
+      case 'navbar-toggleable-xl':
+        $variables['navbar_attributes']['class'][] = 'navbar-expand-xl';
+        break;
+
+      case 'navbar-toggleable-lg':
+        $variables['navbar_attributes']['class'][] = 'navbar-expand-lg';
+        break;
+
+      case 'navbar-toggleable-md':
+        $variables['navbar_attributes']['class'][] = 'navbar-expand-md';
+        break;
+
+      case 'navbar-toggleable-sm':
+        $variables['navbar_attributes']['class'][] = 'navbar-expand-sm';
+        break;
+
+      case 'navbar-toggleable-xs':
+        $variables['navbar_attributes']['class'][] = 'navbar-expand-xs';
+        break;
+
+      case 'navbar-toggleable-all':
+        $variables['navbar_attributes']['class'][] = '';
+        break;
+
+      default:
+        $variables['navbar_attributes']['class'][] = 'navbar-expand-md';
+        break;
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_collapse'), fn() => theme_get_setting('bootstrap_sidebar_collapse'))) {
+      $variables['content_attributes']['class'][] = 'sidebar-offcanvas';
+      $variables['sidebar_collapse'] = TRUE;
+      $variables['#attached']['library'][] = 'bootstrap/sidebar_collapse';
+    }
+    // Declare region attributes.
+    $variables['navbar_top_attributes'] = new Attribute($variables['navbar_top_attributes']);
+    $variables['navbar_attributes'] = new Attribute($variables['navbar_attributes']);
+    $variables['content_attributes'] = new Attribute($variables['content_attributes']);
+    $variables['sidebar_first_attributes'] = new Attribute($variables['sidebar_first_attributes']);
+    $variables['sidebar_second_attributes'] = new Attribute($variables['sidebar_second_attributes']);
+    // Declare container layout.
+    $variables['container_navbar'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_container'), fn() => theme_get_setting('bootstrap_navbar_container'));
+    $variables['container'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_container'), fn() => theme_get_setting('bootstrap_container')) ?? (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_fluid_container'), fn() => theme_get_setting('bootstrap_fluid_container')) ? 'container-fluid' : 'container');
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for page templates.
+   */
+  #[Hook('preprocess_page_title')]
+  public function preprocessPageTitle(&$variables) {
+    // Since the title and the shortcut link are both block level elements,
+    // positioning them next to each other is much simpler with a wrapper div.
+    if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
+      // Add a wrapper div using the title_prefix and title_suffix render
+      // elements.
+      $variables['title_prefix']['shortcut_wrapper'] = [
+        '#markup' => '<div class="shortcut-wrapper clearfix">',
+        '#weight' => 100,
+      ];
+      $variables['title_suffix']['shortcut_wrapper'] = [
+        '#markup' => '</div>',
+        '#weight' => -99,
+      ];
+      // Make sure the shortcut link is the first item in title_suffix.
+      $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
+   */
+  #[Hook('preprocess_maintenance_page')]
+  public function preprocessMaintenancePage(&$variables) {
+    // By default, site_name is set to Drupal if no db connection is available
+    // or during site installation. Setting site_name to an empty string makes
+    // the site and update pages look cleaner.
+    // @see template_preprocess_maintenance_page
+    if (!$variables['db_is_active']) {
+      $variables['site_name'] = '';
+    }
+    // Bootstrap has custom styling for the maintenance page.
+    $variables['#attached']['library'][] = 'bootstrap/maintenance_page';
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for node.html.twig.
+   */
+  #[Hook('preprocess_node')]
+  public function preprocessNode(&$variables) {
+    // Remove the "Add new comment" link on teasers or when the comment form is
+    // displayed on the page.
+    if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) {
+      unset($variables['content']['links']['comment']['#links']['comment-add']);
+    }
+    // Hide label on all nodes.
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_hide_node_label'), fn() => theme_get_setting('bootstrap_hide_node_label')) != NULL) {
+      unset($variables['label']);
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for region.html.twig.
+   */
+  #[Hook('preprocess_region')]
+  public function preprocessRegion(&$variables) {
+    $nowrap = [
+      'breadcrumb',
+      'highlighted',
+      'content',
+      'primary_menu',
+      'header',
+      'sidebar_first',
+      'sidebar_second',
+    ];
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_class_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_class_' . $variables['elements']['#region'])) !== NULL) {
+      $variables['attributes']['class'][] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_class_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_class_' . $variables['elements']['#region']));
+    }
+    elseif (!in_array($variables['elements']['#region'], $nowrap)) {
+      $variables['attributes']['class'][] = 'row';
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_clean_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region'])) !== NULL) {
+      $variables['clean'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_clean_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region']));
+    }
+    else {
+      $variables['clean'] = FALSE;
+    }
+    $variables['container'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_container'), fn() => theme_get_setting('bootstrap_container')) ?? (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_fluid_container'), fn() => theme_get_setting('bootstrap_fluid_container')) ? 'container-fluid' : 'container');
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for block.html.twig.
+   */
+  #[Hook('preprocess_block')]
+  public function preprocessBlock(&$variables) {
+    if ($variables['base_plugin_id'] == 'system_menu_block' && isset($variables['attributes']['id'])) {
+      $variables['content']['#attributes']['id'] = $variables['attributes']['id'];
+    }
+    // Add a clearfix class to system branding blocks.
+    if ($variables['plugin_id'] == 'system_branding_block') {
+      $variables['attributes']['class'][] = 'clearfix';
+    }
+    $block = $variables['elements'];
+    if (!empty($block['#configuration']['provider']) && $block['#configuration']['provider'] == "block_content") {
+      if (isset($block['content']['#block_content']) && $block['content']['#block_content'] !== NULL) {
+        $bundle = $block['content']['#block_content']->bundle();
+        $variables['attributes']['class'][] = 'block-content-' . $bundle;
+      }
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for form elements.
+   */
+  #[Hook('preprocess_form_element')]
+  public function preprocessFormElement(&$variables) {
+    if (isset($variables['label']['#title'])) {
+      if (is_object($variables['label']['#title']) && !$variables['label']['#title'] instanceof MarkupInterface) {
+        $variables['input_title'] = NULL;
+      }
+      elseif (is_object($variables['label']['#title'])) {
+        $variables['input_title'] = $variables['label']['#title'];
+      }
+      else {
+        $variables['input_title'] = $variables['label']['#title'];
+      }
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_float_label'), fn() => theme_get_setting('bootstrap_float_label')) && $variables['element']['#type'] != 'radio' && $variables['element']['#type'] != 'checkbox' && $variables['element']['#type'] != 'date' && $variables['element']['#type'] != 'time' && $variables['element']['#type'] != 'search' && $variables['element']['#type'] != 'select' && $variables['element']['#type'] != 'textarea' && $variables['element']['#type'] != 'managed_file') {
+      $variables['float_label'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_float_label'), fn() => theme_get_setting('bootstrap_float_label'));
+      $variables['label_display'] = 'after';
+    }
+    if (isset($variables['element']['#attributes'])) {
+      $variables['input_attributes'] = new Attribute($variables['element']['#attributes']);
+    }
+    if (isset($variables['element']['#type']) && ($variables['element']['#type'] == 'radio' || $variables['element']['#type'] == 'checkbox')) {
+      switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_checkbox'), fn() => theme_get_setting('bootstrap_checkbox'))) {
+        case 'switch':
+          $variables['checkbox_style'] = 'form-switch';
+          break;
+
+        case 'button':
+          $variables['checkbox_style'] = 'form-button';
+          break;
+      }
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for form-element-label.html.twig.
+   */
+  #[Hook('preprocess_form_element_label')]
+  public function preprocessFormElementLabel(&$variables) {
+    $element = $variables['element'];
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for menu.html.twig.
+   */
+  #[Hook('preprocess_menu')]
+  public function preprocessMenu(&$variables) {
+    $variables['attributes']['class'][] = 'clearfix';
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for menu-local-task.html.twig.
+   */
+  #[Hook('preprocess_menu_local_task')]
+  public function preprocessMenuLocalTask(&$variables) {
+    $link = $variables['element']['#link'];
+    $url = $link['url'];
+    $options = $url->getOptions();
+    $url->setOptions($options + $link['localized_options']);
+    $variables['item'] = Link::fromTextAndUrl($link['title'], $url);
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for menu-local-tasks.html.twig.
+   */
+  #[Hook('preprocess_menu_local_tasks')]
+  public function preprocessMenuLocalTasks(&$variables) {
+    switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_tabs_style'), fn() => theme_get_setting('bootstrap_tabs_style'))) {
+      case 'pills':
+        $variables['nav_style'] = 'nav-pills';
+        break;
+
+      default:
+        $variables['nav_style'] = 'nav-tabs';
+        break;
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter().
+   */
+  #[Hook('theme_suggestions_menu_alter')]
+  public function themeSuggestionsMenuAlter(array &$suggestions, array $variables) {
+    // Taken from http://kristiankaa.dk/article/drupal8-region-specific-menu-theme-hook-suggestion
+    // bootstrap_preprocess_block(&$variables)
+    if (isset($variables['attributes']['block'])) {
+      $hook = str_replace([
+        'block-',
+        '-',
+      ], [
+        '',
+        '_',
+      ], $variables['attributes']['block']);
+      $suggestions[] = $variables['theme_hook_original'] . '__' . $hook;
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for menu-local-action.html.twig.
+   */
+  #[Hook('preprocess_menu_local_action')]
+  public function preprocessMenuLocalAction(&$variables) {
+    $link = $variables['element']['#link'];
+    $link += [
+      'localized_options' => [],
+    ];
+    $link['localized_options']['attributes']['class'][] = 'btn';
+    $link['localized_options']['attributes']['class'][] = 'btn-secondary';
+    $link['localized_options']['set_active_class'] = TRUE;
+    $variables['link'] = [
+      '#type' => 'link',
+      '#title' => $link['title'],
+      '#options' => $link['localized_options'],
+      '#url' => $link['url'],
+    ];
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter() for region templates.
+   */
+  #[Hook('theme_suggestions_region_alter')]
+  public function themeSuggestionsRegionAlter(array &$suggestions, array $variables) {
+    $nowrap = [
+      'breadcrumb',
+      'highlighted',
+      'content',
+      'primary_menu',
+      'header',
+      'sidebar_first',
+      'sidebar_second',
+    ];
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_clean_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region'])) !== NULL) {
+      $region_clean = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_clean_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_clean_' . $variables['elements']['#region']));
+    }
+    else {
+      $region_clean = in_array($variables['elements']['#region'], $nowrap);
+    }
+    $region_width = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_width_' . $variables['elements']['#region']), fn() => theme_get_setting('bootstrap_region_width_' . $variables['elements']['#region']));
+    if ($region_width) {
+      $suggestions[] = 'region__full_width';
+    }
+    elseif ($region_clean) {
+      $suggestions[] = 'region__nowrap';
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter().
+   */
+  #[Hook('theme_suggestions_block_alter')]
+  public function themeSuggestionsBlockAlter(array &$suggestions, array $variables) {
+    $block = $variables['elements'];
+    if (!empty($block['#configuration']['provider']) && $block['#configuration']['provider'] == "block_content") {
+      if (isset($block['content']['#block_content']) && $block['content']['#block_content'] !== NULL) {
+        $bundle = $block['content']['#block_content']->bundle();
+        array_splice($suggestions, 2, 0, 'block__block_' . $bundle);
+      }
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter().
+   */
+  #[Hook('theme_suggestions_user_alter')]
+  public function themeSuggestionsUserAlter(array &$suggestions, array $variables, $hook) {
+    // Define the view mode.
+    $sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
+    $user_id = \Drupal::service('current_user')->id();
+    $suggestions[] = 'user__' . $sanitized_view_mode;
+    $suggestions[] = 'user__' . $user_id;
+    $suggestions[] = 'user__' . $user_id . '__' . $sanitized_view_mode;
+    return $suggestions;
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter() for page template.
+   */
+  #[Hook('theme_suggestions_page_alter')]
+  public function themeSuggestionsPageAlter(array &$suggestions, array $variables) {
+    // Add a template suggestions for node type.
+    /** @var \Drupal\node\NodeInterface $node */
+    if ($node = \Drupal::routeMatch()->getParameter('node')) {
+      if (is_numeric($node)) {
+        $node = Node::load($node);
+      }
+      $suggestions[] = 'page__node__' . $node->bundle();
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter() for links templates.
+   */
+  #[Hook('theme_suggestions_links_alter')]
+  public function themeSuggestionsLinksAlter(array &$suggestions, array $variables) {
+    // @todo get from core a variable to flag inline links.
+    if (isset($variables['attributes']['class'])) {
+      if (in_array('inline', $variables['attributes']['class'])) {
+        $suggestions[] = 'links__inline';
+      }
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter() for status messages templates.
+   */
+  #[Hook('theme_suggestions_status_messages_alter')]
+  public function themeSuggestionsStatusMessagesAlter(array &$suggestions, array $variables) {
+    switch (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_messages_widget'), fn() => theme_get_setting('bootstrap_messages_widget'))) {
+      case 'toasts':
+        $suggestions[] = 'status_messages__toasts';
+        break;
+
+      case 'alerts':
+        $suggestions[] = 'status_messages__alerts';
+        break;
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for breadcrumb.
+   */
+  #[Hook('preprocess_breadcrumb')]
+  public function preprocessBreadcrumb(&$variables) {
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_breadcrumb_divider'), fn() => theme_get_setting('bootstrap_breadcrumb_divider')) && DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_breadcrumb_divider'), fn() => theme_get_setting('bootstrap_breadcrumb_divider')) != '') {
+      $variables['breadcrumb_divider'] = sprintf("--bs-breadcrumb-divider: '%s';", DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_breadcrumb_divider'), fn() => theme_get_setting('bootstrap_breadcrumb_divider')));
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for status_messages.
+   */
+  #[Hook('preprocess_status_messages')]
+  public function preprocessStatusMessages(&$variables) {
+    $variables['title_ids'] = [];
+    if (is_array($variables['message_list'])) {
+      foreach ($variables['message_list'] as $message_type => $messages) {
+        $variables['title_ids'][$message_type] = Html::getUniqueId("message-{$message_type}-title");
+      }
+    }
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_messages_widget'), fn() => theme_get_setting('bootstrap_messages_widget')) === 'toasts') {
+      $variables['attributes']['data-bs-delay'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_messages_widget_toast_delay'), fn() => theme_get_setting('bootstrap_messages_widget_toast_delay')) ?? 10000;
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter() for form templates.
+   */
+  #[Hook('theme_suggestions_form_alter')]
+  public function themeSuggestionsFormAlter(array &$suggestions, array $variables) {
+    if ($variables['element']['#form_id'] == 'search_block_form') {
+      $suggestions[] = 'form__search_block_form';
+    }
+    if ($variables['element']['#form_id'] == 'node_form') {
+      $suggestions[] = 'node_edit_form';
+    }
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter() for form templates.
+   */
+  #[Hook('theme_suggestions_input_alter')]
+  public function themeSuggestionsInputAlter(array &$suggestions, array $variables) {
+    if ($variables['element']['#type'] == 'submit' && DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button'), fn() => theme_get_setting('bootstrap_button'))) {
+      $suggestions[] = 'input__submit_button';
+    }
+  }
+
+  /**
+   * Implements hook_preprocess().
+   */
+  #[Hook('preprocess')]
+  public function preprocess(&$variables, $hook) {
+    if (is_array($variables['attributes'] ?? NULL) && isset($variables['attributes']['class'])) {
+      $class = 'is-invalid';
+      if (is_object($variables['attributes']['class'])) {
+        if (in_array('error', $variables['attributes']['class']->value())) {
+          $variables['attributes']->addClass($class);
+          // If there is a wrapper, add class too.
+          if (isset($variables["wrapper_attributes"])) {
+            $variables['wrapper_attributes']->addClass($class);
+          }
+        }
+      }
+      elseif (is_array($variables['attributes']['class'])) {
+        if (in_array('error', $variables['attributes']['class'])) {
+          $variables['attributes']['class'][] = $class;
+        }
+      }
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_input() for adding classes to inputs.
+   */
+  #[Hook('preprocess_input')]
+  public function preprocessInput(&$variables) {
+    if ($variables['element']['#type'] == 'submit') {
+      $button_size = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button_size'), fn() => theme_get_setting('bootstrap_button_size'));
+      $button_types = [
+        'btn-primary',
+        'btn-secondary',
+        'btn-success',
+        'btn-warning',
+        'btn-danger',
+        'btn-link',
+      ];
+      $button_sizes = [
+        'btn-sm',
+        'btn-lg',
+      ];
+      $button_is_outline = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button_outline'), fn() => theme_get_setting('bootstrap_button_outline'));
+      $button_type = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button_type'), fn() => theme_get_setting('bootstrap_button_type')) ?? 'primary';
+      if (is_object($variables['attributes']['class'])) {
+        \Drupal::logger('bootstrap')->notice(implode($variables['attributes']['class']->value()));
+        if (!in_array('btn', $variables['attributes']['class']->value())) {
+          $variables['attributes']['class']->addClass('btn');
+        }
+        if (empty(array_intersect($button_types, $variables['attributes']['class']->value()))) {
+          if ($button_is_outline) {
+            $variables['attributes']['class']->addClass('btn-outline-' . $button_type);
+          }
+          else {
+            $variables['attributes']['class']->addClass('btn-' . $button_type);
+          }
+        }
+        if ($button_size && empty(array_intersect($button_sizes, $variables['attributes']['class']->value()))) {
+          $variables['attributes']['class']->addClass($button_size);
+        }
+      }
+      else {
+        if (!in_array('btn', $variables['attributes']['class'])) {
+          $variables['attributes']['class'][] = 'btn';
+        }
+        if (empty(array_intersect($button_types, $variables['attributes']['class']))) {
+          if ($button_is_outline) {
+            $variables['attributes']['class'][] = 'btn-outline-' . $button_type;
+          }
+          else {
+            $variables['attributes']['class'][] = 'btn-' . $button_type;
+          }
+        }
+        if ($button_size && empty(array_intersect($button_sizes, $variables['attributes']['class']))) {
+          $variables['attributes']['class'][] = $button_size;
+        }
+        $variables['attributes'] = new Attribute($variables['attributes']);
+      }
+      $variables['safe_value_label'] = Xss::filter($variables['attributes']['value'] ?? '');
+    }
+    if ($variables['element']['#type'] != 'radio' && $variables['element']['#type'] != 'checkbox' && $variables['element']['#type'] != 'date' && $variables['element']['#type'] != 'time' && $variables['element']['#type'] != 'managed_file' && $variables['element']['#type'] != 'select' && $variables['element']['#type'] != 'search' && $variables['element']['#type'] != 'textarea' && DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_float_label'), fn() => theme_get_setting('bootstrap_float_label')) && !isset($variables['attributes']['placeholder'])) {
+      $variables['attributes']['placeholder'] = $variables['element']['#title'] ?? '';
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_select() for adding classes to select boxes.
+   */
+  #[Hook('preprocess_select')]
+  public function preprocessSelect(&$variables) {
+    if (isset($variables['attributes']['class'])) {
+      if (is_object($variables['attributes']['class'])) {
+        if (in_array('error', $variables['attributes']['class']->value())) {
+          $variables['attributes']['class']->addClass('is-invalid');
+        }
+      }
+      elseif (is_array($variables['attributes']['class'])) {
+        if (in_array('error', $variables['attributes']['class'])) {
+          $variables['attributes']['class'][] = 'is-invalid';
+        }
+      }
+    }
+  }
+
+}
diff --git a/subthemes/bootstrap_sass/bootstrap_sass.services.yml b/subthemes/bootstrap_sass/bootstrap_sass.services.yml
new file mode 100644
index 0000000..219550f
--- /dev/null
+++ b/subthemes/bootstrap_sass/bootstrap_sass.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\bootstrap_sass\Hook\BootstrapSassHooks:
+    class: Drupal\bootstrap_sass\Hook\BootstrapSassHooks
+    autowire: true
diff --git a/subthemes/bootstrap_sass/bootstrap_sass.theme b/subthemes/bootstrap_sass/bootstrap_sass.theme
index 3a75ab9..562b8aa 100644
--- a/subthemes/bootstrap_sass/bootstrap_sass.theme
+++ b/subthemes/bootstrap_sass/bootstrap_sass.theme
@@ -5,6 +5,8 @@
  * Functions to support theming in the SASS Starterkit subtheme.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\bootstrap_sass\Hook\BootstrapSassHooks;
 use Drupal\Core\Form\FormStateInterface;
 
 /**
@@ -12,21 +14,7 @@ use Drupal\Core\Form\FormStateInterface;
  *
  * Replace Bootstrap setting options with subtheme ones.
  */
+#[LegacyHook]
 function bootstrap_sass_form_system_theme_settings_alter(&$form, FormStateInterface $form_state) {
-  $form['components']['navbar']['bootstrap_navbar_top_background']['#options'] = array(
-    'bg-primary' => t('Primary'),
-    'bg-secondary' => t('Secondary'),
-    'bg-light' => t('Light'),
-    'bg-dark' => t('Dark'),
-    'bg-white' => t('White'),
-    'bg-transparent' => t('Transparent'),
-  );
-  $form['components']['navbar']['bootstrap_navbar_background']['#options'] = array(
-    'bg-primary' => t('Primary'),
-    'bg-secondary' => t('Secondary'),
-    'bg-light' => t('Light'),
-    'bg-dark' => t('Dark'),
-    'bg-white' => t('White'),
-    'bg-transparent' => t('Transparent'),
-  );
-}
\ No newline at end of file
+  \Drupal::service(BootstrapSassHooks::class)->formSystemThemeSettingsAlter($form, $form_state);
+}
diff --git a/subthemes/bootstrap_sass/src/Hook/BootstrapSassHooks.php b/subthemes/bootstrap_sass/src/Hook/BootstrapSassHooks.php
new file mode 100644
index 0000000..8a0893b
--- /dev/null
+++ b/subthemes/bootstrap_sass/src/Hook/BootstrapSassHooks.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\bootstrap_sass\Hook;
+
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for bootstrap_sass.
+ */
+class BootstrapSassHooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_form_system_theme_settings_alter() for settings form.
+   *
+   * Replace Bootstrap setting options with subtheme ones.
+   */
+  #[Hook('form_system_theme_settings_alter')]
+  public function formSystemThemeSettingsAlter(&$form, FormStateInterface $form_state) {
+    $form['components']['navbar']['bootstrap_navbar_top_background']['#options'] = [
+      'bg-primary' => $this->t('Primary'),
+      'bg-secondary' => $this->t('Secondary'),
+      'bg-light' => $this->t('Light'),
+      'bg-dark' => $this->t('Dark'),
+      'bg-white' => $this->t('White'),
+      'bg-transparent' => $this->t('Transparent'),
+    ];
+    $form['components']['navbar']['bootstrap_navbar_background']['#options'] = [
+      'bg-primary' => $this->t('Primary'),
+      'bg-secondary' => $this->t('Secondary'),
+      'bg-light' => $this->t('Light'),
+      'bg-dark' => $this->t('Dark'),
+      'bg-white' => $this->t('White'),
+      'bg-transparent' => $this->t('Transparent'),
+    ];
+  }
+
+}
diff --git a/subthemes/bootstrap_subtheme/color/color.inc b/subthemes/bootstrap_subtheme/color/color.inc
index 50670ba..c9b5753 100644
--- a/subthemes/bootstrap_subtheme/color/color.inc
+++ b/subthemes/bootstrap_subtheme/color/color.inc
@@ -2,9 +2,15 @@
 
 /**
  * @file
- * Lists available colors and color schemes for the Bootstrap theme.
  */
 
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\ThemeSettingsProvider;
+
+/**
+ * @file
+ * Lists available colors and color schemes for the Bootstrap theme.
+ */
 $info = [
   // Available colors and color labels used in theme.
   'fields' => [
@@ -123,7 +129,7 @@ $info = [
     'drupalSettings' => [
       'color' => [
         // Put the logo path into JavaScript for the live preview.
-        'logo' => theme_get_setting('logo.url', 'bootstrap_subtheme'),
+        'logo' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('logo.url', 'bootstrap_subtheme'), fn() => theme_get_setting('logo.url', 'bootstrap_subtheme')),
       ],
     ],
   ],
diff --git a/tests/src/Functional/BootstrapBarrioSubThemeTest.php b/tests/src/Functional/BootstrapBarrioSubThemeTest.php
index d296426..508ad07 100644
--- a/tests/src/Functional/BootstrapBarrioSubThemeTest.php
+++ b/tests/src/Functional/BootstrapBarrioSubThemeTest.php
@@ -2,12 +2,16 @@
 
 namespace Drupal\Tests\bootstrap\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 
 /**
  * Tests the Bootstrap theme.
  *
  * @group claro
  */
+#[Group('claro')]
+#[RunTestsInSeparateProcesses]
 class BootstrapBootstrapSubThemeTest extends BootstrapBootstrapTest {
 
   /**
diff --git a/tests/src/Functional/BootstrapBarrioTest.php b/tests/src/Functional/BootstrapBarrioTest.php
index d937385..668468a 100644
--- a/tests/src/Functional/BootstrapBarrioTest.php
+++ b/tests/src/Functional/BootstrapBarrioTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\bootstrap\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -9,6 +11,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group claro
  */
+#[Group('claro')]
+#[RunTestsInSeparateProcesses]
 class BootstrapBootstrapTest extends BrowserTestBase {
 
   /**
@@ -27,7 +31,6 @@ class BootstrapBootstrapTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'bootstrap';
 
-
   /**
    * Test Bootstrap's configuration schema.
    */
diff --git a/theme-settings.php b/theme-settings.php
index f83e8fa..2b7c64d 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -7,6 +7,8 @@
  * Provides theme settings for Bootstrap-based themes.
  */
 
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\ThemeSettingsProvider;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
 use Drupal\Core\Link;
@@ -100,7 +102,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['bootstrap_source'] = [
     '#type' => 'select',
     '#title' => t('Load library'),
-    '#default_value' => theme_get_setting('bootstrap_source'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_source'), fn() => theme_get_setting('bootstrap_source')),
     '#options' => [
       'bootstrap/bootstrap' => t('Local'),
       'bootstrap/bootswatch_cerulean' => t('Bootswatch Cerulean'),
@@ -126,7 +128,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
       'bootstrap/bootswatch_yeti' => t('Bootswatch Yeti'),
     ],
     '#empty_option' => t('None'),
-    '#empty_value' => false,
+    '#empty_value' => FALSE,
   ];
 
   // Vertical tabs.
@@ -152,7 +154,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['colors']['scheme']['bootstrap_enable_color'] = [
     '#type' => 'checkbox',
     '#title' => t('Enable color Scheme'),
-    '#default_value' => theme_get_setting('bootstrap_enable_color'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_enable_color'), fn() => theme_get_setting('bootstrap_enable_color')),
     '#ajax' => [
       'callback' => 'colorCallback',
       'wrapper' => 'color_container',
@@ -166,11 +168,11 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['colors']['scheme']['color_container'] = [
     '#type' => 'container',
     '#attributes' => [
-      'id' => 'color_container'
+      'id' => 'color_container',
     ],
   ];
 
-  if ($form_state->getValue('bootstrap_enable_color', theme_get_setting('bootstrap_enable_color'))) {
+  if ($form_state->getValue('bootstrap_enable_color', DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_enable_color'), fn() => theme_get_setting('bootstrap_enable_color')))) {
     $form['colors']['scheme']['color_container']['bootstrap_color_scheme'] = [
       '#type' => 'select',
       '#title' => t('Bootstrap Color Scheme'),
@@ -198,7 +200,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
         '#size' => 10,
         '#title' => t($title),
         '#description' => t('Enter color in full hexadecimal format (#abc123).') . '<br/>' . t('Derivatives will be formed from this color.'),
-        '#default_value' => theme_get_setting($key),
+        '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting($key), fn() => theme_get_setting($key)),
         '#attributes' => [
           'pattern' => '^#[a-fA-F0-9]{6}',
         ],
@@ -210,7 +212,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     $form['colors']['scheme']['color_container']['bootstrap_body_color'] = [
       '#type' => 'select',
       '#title' => t('Body color'),
-      '#default_value' => theme_get_setting('bootstrap_body_color') ?? 'gray-800',
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_body_color'), fn() => theme_get_setting('bootstrap_body_color')) ?? 'gray-800',
       '#options' => [
         'gray-800' => t('Dark gray'),
         'black' => t('Black'),
@@ -219,7 +221,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     $form['colors']['scheme']['color_container']['bootstrap_body_bg_color'] = [
       '#type' => 'select',
       '#title' => t('Body Background Color'),
-      '#default_value' => theme_get_setting('bootstrap_body_bg_color') ?? 'white',
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_body_bg_color'), fn() => theme_get_setting('bootstrap_body_bg_color')) ?? 'white',
       '#options' => [
         'white' => t('White'),
         'gray-200' => t('Light gray'),
@@ -228,7 +230,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     $form['colors']['scheme']['color_container']['bootstrap_h1_color'] = [
       '#type' => 'select',
       '#title' => t('H1 color'),
-      '#default_value' => theme_get_setting('bootstrap_h1_color') ?? 'base',
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_h1_color'), fn() => theme_get_setting('bootstrap_h1_color')) ?? 'base',
       '#options' => [
         'base' => t('Base color'),
         'primary' => t('Primary color'),
@@ -238,7 +240,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     $form['colors']['scheme']['color_container']['bootstrap_h2_color'] = [
       '#type' => 'select',
       '#title' => t('H2 color'),
-      '#default_value' => theme_get_setting('bootstrap_h2_color') ?? 'base',
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_h2_color'), fn() => theme_get_setting('bootstrap_h2_color')) ?? 'base',
       '#options' => [
         'base' => t('Base color'),
         'primary' => t('Primary color'),
@@ -248,7 +250,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     $form['colors']['scheme']['color_container']['bootstrap_h3_color'] = [
       '#type' => 'select',
       '#title' => t('H3 color'),
-      '#default_value' => theme_get_setting('bootstrap_h3_color') ?? 'base',
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_h3_color'), fn() => theme_get_setting('bootstrap_h3_color')) ?? 'base',
       '#options' => [
         'base' => t('Base color'),
         'primary' => t('Primary color'),
@@ -267,7 +269,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['colors']['alerts']['bootstrap_system_messages'] = [
     '#type' => 'select',
     '#title' => t('System messages color scheme'),
-    '#default_value' => theme_get_setting('bootstrap_system_messages'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_system_messages'), fn() => theme_get_setting('bootstrap_system_messages')),
     '#empty_option' => t('Default'),
     '#options' => [
       'messages_white' => t('White'),
@@ -288,7 +290,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['colors']['tables']['bootstrap_table_style'] = [
     '#type' => 'select',
     '#title' => t('Table cell style'),
-    '#default_value' => theme_get_setting('bootstrap_table_style'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_style'), fn() => theme_get_setting('bootstrap_table_style')),
     '#empty_option' => t('Default'),
     '#options' => [
       'table-striped' => t('Striped'),
@@ -299,12 +301,12 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['colors']['tables']['bootstrap_table_hover'] = [
     '#type' => 'checkbox',
     '#title' => t('Hover effect over table cells'),
-    '#default_value' => theme_get_setting('bootstrap_table_hover'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_hover'), fn() => theme_get_setting('bootstrap_table_hover')),
   ];
   $form['colors']['tables']['bootstrap_table_head'] = [
     '#type' => 'select',
     '#title' => t('Table header color scheme'),
-    '#default_value' => theme_get_setting('bootstrap_table_head'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_table_head'), fn() => theme_get_setting('bootstrap_table_head')),
     '#empty_option' => t('Default'),
     '#options' => [
       'thead-light' => t('Light'),
@@ -329,8 +331,8 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['container']['bootstrap_container'] = [
     '#type' => 'select',
     '#title' => t('Container'),
-    '#default_value' => theme_get_setting('bootstrap_container') ??
-      (theme_get_setting('bootstrap_fluid_container') ? 'container-fluid' : 'container'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_container'), fn() => theme_get_setting('bootstrap_container')) ??
+    (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_fluid_container'), fn() => theme_get_setting('bootstrap_fluid_container')) ? 'container-fluid' : 'container'),
     '#options' => [
       'container' => t('Container'),
       'container-md' => t('Container Medium'),
@@ -343,18 +345,18 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
       '@bootstrap_fluid_containers_link' => Link::fromTextAndUrl('Containers in the Bootstrap 5 documentation', Url::fromUri('https://getbootstrap.com/docs/5.2/layout/overview/', ['absolute' => TRUE, 'fragment' => 'containers']))->toString(),
     ]),
   ];
-/*  $form['layout']['container']['bootstrap_fluid_container'] = [
-    '#type' => 'checkbox',
-    '#title' => t('Fluid container'),
-    '#default_value' => theme_get_setting('bootstrap_fluid_container'),
-    '#description' => t('Use <code>.container-fluid</code> class. See @bootstrap_fluid_containers_link.', [
-      '@bootstrap_fluid_containers_link' => Link::fromTextAndUrl('Containers in the Bootstrap 5 documentation', Url::fromUri('https://getbootstrap.com/docs/5.2/layout/overview/', ['absolute' => TRUE, 'fragment' => 'containers']))->toString(),
-    ]),
+  /*  $form['layout']['container']['bootstrap_fluid_container'] = [
+  '#type' => 'checkbox',
+  '#title' => t('Fluid container'),
+  '#default_value' => theme_get_setting('bootstrap_fluid_container'),
+  '#description' => t('Use <code>.container-fluid</code> class. See @bootstrap_fluid_containers_link.', [
+  '@bootstrap_fluid_containers_link' => Link::fromTextAndUrl('Containers in the Bootstrap 5 documentation', Url::fromUri('https://getbootstrap.com/docs/5.2/layout/overview/', ['absolute' => TRUE, 'fragment' => 'containers']))->toString(),
+  ]),
   ];
-*/
+   */
   // List of regions.
   $theme = \Drupal::theme()->getActiveTheme()->getName();
-  $region_list = system_region_list($theme);
+  $region_list = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => \Drupal::service('theme_handler')->getTheme($theme)->listAllRegions(), fn() => system_region_list($theme));
 
   // Only for initial setup if not defined on install.
   $nowrap = [
@@ -375,14 +377,14 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     '#collapsed' => TRUE,
   ];
   foreach ($region_list as $name => $description) {
-    if (theme_get_setting('bootstrap_region_clean_' . $name) !== NULL) {
-      $region_clean = theme_get_setting('bootstrap_region_clean_' . $name);
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_clean_' . $name), fn() => theme_get_setting('bootstrap_region_clean_' . $name)) !== NULL) {
+      $region_clean = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_clean_' . $name), fn() => theme_get_setting('bootstrap_region_clean_' . $name));
     }
     else {
       $region_clean = in_array($name, $nowrap);
     }
-    if (theme_get_setting('bootstrap_region_class_' . $name) !== NULL) {
-      $region_class = theme_get_setting('bootstrap_region_class_' . $name);
+    if (DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_class_' . $name), fn() => theme_get_setting('bootstrap_region_class_' . $name)) !== NULL) {
+      $region_class = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_class_' . $name), fn() => theme_get_setting('bootstrap_region_class_' . $name));
     }
     else {
       $region_class = $region_clean ? NULL : 'row';
@@ -402,7 +404,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     $form['layout']['region'][$name]['bootstrap_region_width_' . $name] = [
       '#type' => 'checkbox',
       '#title' => t('Full width wrapper for @description region', ['@description' => $description]),
-      '#default_value' => theme_get_setting('bootstrap_region_width_' . $name),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_region_width_' . $name), fn() => theme_get_setting('bootstrap_region_width_' . $name)),
     ];
     $form['layout']['region'][$name]['bootstrap_region_class_' . $name] = [
       '#type' => 'textfield',
@@ -423,7 +425,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['sidebar_position']['bootstrap_sidebar_position'] = [
     '#type' => 'select',
     '#title' => t('Sidebars position'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_position'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_position'), fn() => theme_get_setting('bootstrap_sidebar_position')),
     '#options' => [
       'left' => t('Left'),
       'both' => t('Both sides'),
@@ -433,7 +435,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['sidebar_position']['bootstrap_content_offset'] = [
     '#type' => 'select',
     '#title' => t('Content offset'),
-    '#default_value' => theme_get_setting('bootstrap_content_offset'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_content_offset'), fn() => theme_get_setting('bootstrap_content_offset')),
     '#options' => [
       0 => t('None'),
       1 => t('1 cols'),
@@ -451,12 +453,12 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['sidebar_first']['bootstrap_sidebar_collapse'] = [
     '#type' => 'checkbox',
     '#title' => t('Sidebar collapse'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_collapse'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_collapse'), fn() => theme_get_setting('bootstrap_sidebar_collapse')),
   ];
   $form['layout']['sidebar_first']['bootstrap_sidebar_first_width'] = [
     '#type' => 'select',
     '#title' => t('Sidebar first width'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_first_width'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_width'), fn() => theme_get_setting('bootstrap_sidebar_first_width')),
     '#options' => [
       2 => t('2 cols'),
       3 => t('3 cols'),
@@ -466,7 +468,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['sidebar_first']['bootstrap_sidebar_first_offset'] = [
     '#type' => 'select',
     '#title' => t('Sidebar first offset'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_first_offset'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_offset'), fn() => theme_get_setting('bootstrap_sidebar_first_offset')),
     '#options' => [
       0 => t('None'),
       1 => t('1 cols'),
@@ -484,7 +486,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['sidebar_second']['bootstrap_sidebar_second_width'] = [
     '#type' => 'select',
     '#title' => t('Sidebar second width'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_second_width'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_width'), fn() => theme_get_setting('bootstrap_sidebar_second_width')),
     '#options' => [
       2 => t('2 cols'),
       3 => t('3 cols'),
@@ -494,7 +496,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['layout']['sidebar_second']['bootstrap_sidebar_second_offset'] = [
     '#type' => 'select',
     '#title' => t('Sidebar second offset'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_second_offset'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_offset'), fn() => theme_get_setting('bootstrap_sidebar_second_offset')),
     '#options' => [
       0 => t('None'),
       1 => t('1 cols'),
@@ -519,7 +521,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['node']['bootstrap_hide_node_label'] = [
     '#type' => 'checkbox',
     '#title' => t('Hide node label'),
-    '#default_value' => theme_get_setting('bootstrap_hide_node_label'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_hide_node_label'), fn() => theme_get_setting('bootstrap_hide_node_label')),
     '#description' => t('Hide node label for all display. Usefull when using f.e. Layout Builder and you want full control of your output'),
   ];
 
@@ -535,7 +537,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     '#title' => t('Breadcrumb Divider'),
     '#size' => 60,
     '#maxlength' => 256,
-    '#default_value' => theme_get_setting('bootstrap_breadcrumb_divider'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_breadcrumb_divider'), fn() => theme_get_setting('bootstrap_breadcrumb_divider')),
     '#description' => t('Change the default breadcrumb divider. See @bootstrap_breadcrumb_link.', [
       '@bootstrap_breadcrumb_link' => Link::fromTextAndUrl('breadcrumb in the Bootstrap 5.x documentation', Url::fromUri('https://getbootstrap.com/docs/5.2/components/breadcrumb/', ['absolute' => TRUE, 'fragment' => 'outline-buttons']))->toString(),
     ]),
@@ -551,13 +553,13 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['buttons']['bootstrap_button'] = [
     '#type' => 'checkbox',
     '#title' => t('Convert input submit to button element'),
-    '#default_value' => theme_get_setting('bootstrap_button'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button'), fn() => theme_get_setting('bootstrap_button')),
     '#description' => t('There is a known issue where Ajax exposed filters do not if this setting is enabled.'),
   ];
   $form['components']['buttons']['bootstrap_button_type'] = [
     '#type' => 'select',
     '#title' => t('Default button type'),
-    '#default_value' => theme_get_setting('bootstrap_button_type'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button_type'), fn() => theme_get_setting('bootstrap_button_type')),
     '#options' => [
       'primary' => t('Primary'),
       'secondary' => t('Secondary'),
@@ -566,7 +568,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['buttons']['bootstrap_button_size'] = [
     '#type' => 'select',
     '#title' => t('Default button size'),
-    '#default_value' => theme_get_setting('bootstrap_button_size'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button_size'), fn() => theme_get_setting('bootstrap_button_size')),
     '#empty_option' => t('Normal'),
     '#options' => [
       'btn-sm' => t('Small'),
@@ -576,7 +578,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['buttons']['bootstrap_button_outline'] = [
     '#type' => 'checkbox',
     '#title' => t('Button with outline format'),
-    '#default_value' => theme_get_setting('bootstrap_button_outline'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_button_outline'), fn() => theme_get_setting('bootstrap_button_outline')),
     '#description' => t('Use <code>.btn-default-outline</code> class. See @bootstrap_outline_buttons_link.', [
       '@bootstrap_outline_buttons_link' => Link::fromTextAndUrl('Outline buttons in the Bootstrap 4 documentation', Url::fromUri('https://getbootstrap.com/docs/5.2/components/buttons/', ['absolute' => TRUE, 'fragment' => 'outline-buttons']))->toString(),
     ]),
@@ -592,7 +594,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['images']['bootstrap_image_fluid'] = [
     '#type' => 'checkbox',
     '#title' => t('Apply img-fluid style to all content images'),
-    '#default_value' => theme_get_setting('bootstrap_image_fluid'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_image_fluid'), fn() => theme_get_setting('bootstrap_image_fluid')),
     '#description' => t('Adds a img-fluid style to all ".content img" elements'),
   ];
 
@@ -607,13 +609,13 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     '#type' => 'checkbox',
     '#title' => t('Navbar width container'),
     '#description' => t('Check if navbar width will be inside container or fluid width.'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_container'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_container'), fn() => theme_get_setting('bootstrap_navbar_container')),
   ];
   $form['components']['navbar']['bootstrap_navbar_toggle'] = [
     '#type' => 'select',
     '#title' => t('Navbar toggle size'),
     '#description' => t('Select size for navbar to collapse.'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_toggle'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_toggle'), fn() => theme_get_setting('bootstrap_navbar_toggle')),
     '#options' => [
       'navbar-toggleable-xl' => t('Extra Large'),
       'navbar-toggleable-lg' => t('Large'),
@@ -627,13 +629,13 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     '#type' => 'checkbox',
     '#title' => t('Navbar top is navbar'),
     '#description' => t('Check if navbar top .navbar class should be added.'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_top_navbar'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_navbar'), fn() => theme_get_setting('bootstrap_navbar_top_navbar')),
   ];
   $form['components']['navbar']['bootstrap_navbar_top_position'] = [
     '#type' => 'select',
     '#title' => t('Navbar top position'),
     '#description' => t('Select your navbar top position.'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_top_position'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_position'), fn() => theme_get_setting('bootstrap_navbar_top_position')),
     '#options' => [
       'fixed-top' => t('Fixed top'),
       'fixed-bottom' => t('Fixed bottom'),
@@ -644,7 +646,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar']['bootstrap_navbar_top_color'] = [
     '#type' => 'select',
     '#title' => t('Navbar top link color'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_top_color'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_color'), fn() => theme_get_setting('bootstrap_navbar_top_color')),
     '#options' => [
       'navbar-light' => t('Light'),
       'navbar-dark' => t('Dark'),
@@ -654,7 +656,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar']['bootstrap_navbar_top_background'] = [
     '#type' => 'select',
     '#title' => t('Navbar top background color'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_top_background'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_background'), fn() => theme_get_setting('bootstrap_navbar_top_background')),
     '#options' => [
       'bg-primary' => t('Primary'),
       'bg-light' => t('Light'),
@@ -665,7 +667,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar']['bootstrap_navbar_position'] = [
     '#type' => 'select',
     '#title' => t('Navbar position'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_position'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_position'), fn() => theme_get_setting('bootstrap_navbar_position')),
     '#options' => [
       'fixed-top' => t('Fixed top'),
       'fixed-bottom' => t('Fixed bottom'),
@@ -676,7 +678,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar']['bootstrap_navbar_color'] = [
     '#type' => 'select',
     '#title' => t('Navbar link color'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_color'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_color'), fn() => theme_get_setting('bootstrap_navbar_color')),
     '#options' => [
       'navbar-light' => t('Light'),
       'navbar-dark' => t('Dark'),
@@ -686,7 +688,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar']['bootstrap_navbar_background'] = [
     '#type' => 'select',
     '#title' => t('Navbar background color'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_background'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_background'), fn() => theme_get_setting('bootstrap_navbar_background')),
     '#options' => [
       'bg-primary' => t('Primary'),
       'bg-light' => t('Light'),
@@ -698,14 +700,14 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar']['bootstrap_navbar_top_class'] = [
     '#type' => 'textfield',
     '#title' => t('Custom classes for Navbar Top'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_top_class'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_class'), fn() => theme_get_setting('bootstrap_navbar_top_class')),
     '#size' => 40,
     '#maxlength' => 40,
   ];
   $form['components']['navbar']['bootstrap_navbar_class'] = [
     '#type' => 'textfield',
     '#title' => t('Custom classes for Navbar'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_class'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_class'), fn() => theme_get_setting('bootstrap_navbar_class')),
     '#size' => 40,
     '#maxlength' => 40,
   ];
@@ -721,7 +723,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar_behaviour']['bootstrap_navbar_offcanvas'] = [
     '#type' => 'select',
     '#title' => t('Default/Bootstrap Offcanvas Collapse'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_offcanvas'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_offcanvas'), fn() => theme_get_setting('bootstrap_navbar_offcanvas')),
     '#options' => [
       'offcanvas-collapse' => t('Offcanvas'),
     ],
@@ -731,14 +733,14 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['navbar_behaviour']['bootstrap_navbar_flyout'] = [
     '#type' => 'checkbox',
     '#title' => t('Flyout style main menu'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_flyout'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_flyout'), fn() => theme_get_setting('bootstrap_navbar_flyout')),
   ];
 
   $form['components']['navbar_behaviour']['bootstrap_navbar_slide'] = [
     '#type' => 'checkbox',
     '#title' => t('Sliding navbar'),
     '#description' => t('Collapsed navbar will slide left to right'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_slide'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_slide'), fn() => theme_get_setting('bootstrap_navbar_slide')),
     '#description' => t('DO NOT USE IN NEW SITES. Removed in favor of Bootstrap Offcanvas.'),
   ];
 
@@ -753,7 +755,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['tabs']['bootstrap_tabs_style'] = [
     '#type' => 'select',
     '#title' => t('Tabs style'),
-    '#default_value' => theme_get_setting('bootstrap_tabs_style'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_tabs_style'), fn() => theme_get_setting('bootstrap_tabs_style')),
     '#options' => [
       'full' => t('Full width blocks'),
       'pills' => t('Pills'),
@@ -771,7 +773,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['alerts']['bootstrap_messages_widget'] = [
     '#type' => 'select',
     '#title' => t('Messages widget'),
-    '#default_value' => theme_get_setting('bootstrap_messages_widget'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_messages_widget'), fn() => theme_get_setting('bootstrap_messages_widget')),
     '#options' => [
       'default' => t('Alerts classic'),
       'alerts' => t('Alerts bottom'),
@@ -781,7 +783,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['alerts']['bootstrap_messages_widget_toast_delay'] = [
     '#type' => 'number',
     '#title' => t('Toast delay'),
-    '#default_value' => theme_get_setting('bootstrap_messages_widget_toast_delay') ?? 10000,
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_messages_widget_toast_delay'), fn() => theme_get_setting('bootstrap_messages_widget_toast_delay')) ?? 10000,
     '#description' => t('How long to keep the toast open in milliseconds.'),
     '#states' => [
       'visible' => [
@@ -800,12 +802,12 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['components']['form']['bootstrap_float_label'] = [
     '#type' => 'checkbox',
     '#title' => t('Float Labels'),
-    '#default_value' => theme_get_setting('bootstrap_float_label'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_float_label'), fn() => theme_get_setting('bootstrap_float_label')),
   ];
   $form['components']['form']['bootstrap_checkbox'] = [
     '#type' => 'select',
     '#title' => t('Checkbox & Radio Style'),
-    '#default_value' => theme_get_setting('bootstrap_checkbox'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_checkbox'), fn() => theme_get_setting('bootstrap_checkbox')),
     '#empty_option' => t('Default'),
     '#options' => [
       'switch' => t('Switch'),
@@ -828,7 +830,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['affix']['navbar_top']['bootstrap_navbar_top_affix'] = [
     '#type' => 'checkbox',
     '#title' => t('Affix navbar top'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_top_affix'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_top_affix'), fn() => theme_get_setting('bootstrap_navbar_top_affix')),
   ];
   /*
   $form['affix']['navbar_top']['bootstrap_navbar_top_affix_top'] = [
@@ -869,7 +871,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['affix']['navbar']['bootstrap_navbar_affix'] = [
     '#type' => 'checkbox',
     '#title' => t('Affix navbar'),
-    '#default_value' => theme_get_setting('bootstrap_navbar_affix'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_navbar_affix'), fn() => theme_get_setting('bootstrap_navbar_affix')),
   ];
   /*
   $form['affix']['navbar']['bootstrap_navbar_affix_top'] = [
@@ -908,7 +910,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['affix']['sidebar_first']['bootstrap_sidebar_first_affix'] = [
     '#type' => 'checkbox',
     '#title' => t('Affix sidebar first'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_first_affix'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_first_affix'), fn() => theme_get_setting('bootstrap_sidebar_first_affix')),
   ];
   /*
   $form['affix']['sidebar_first'][
@@ -950,7 +952,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['affix']['sidebar_second']['bootstrap_sidebar_second_affix'] = [
     '#type' => 'checkbox',
     '#title' => t('Affix sidebar second'),
-    '#default_value' => theme_get_setting('bootstrap_sidebar_second_affix'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_sidebar_second_affix'), fn() => theme_get_setting('bootstrap_sidebar_second_affix')),
   ];
   /*
   $form['affix']['sidebar_second'][
@@ -994,7 +996,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
     '#type' => 'textfield',
     '#title' => t('Scrollspy element ID'),
     '#description' => t('Specify a valid jQuery ID for the element containing a .nav that will behave with scrollspy.'),
-    '#default_value' => theme_get_setting('bootstrap_scroll_spy'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_scroll_spy'), fn() => theme_get_setting('bootstrap_scroll_spy')),
     '#size' => 40,
     '#maxlength' => 40,
   ];
@@ -1014,7 +1016,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['fonts']['fonts']['bootstrap_google_fonts'] = [
     '#type' => 'select',
     '#title' => t('Google Fonts combination'),
-    '#default_value' => theme_get_setting('bootstrap_google_fonts'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_google_fonts'), fn() => theme_get_setting('bootstrap_google_fonts')),
     '#empty_option' => t('None'),
     '#options' => [
       'roboto' => t('Roboto Condensed, Roboto'),
@@ -1042,7 +1044,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['fonts']['bootstrap_icons']['bootstrap_bootstrap_icons'] = [
     '#type' => 'checkbox',
     '#title' => t('Use Bootstrap icons'),
-    '#default_value' => theme_get_setting('bootstrap_bootstrap_icons'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_bootstrap_icons'), fn() => theme_get_setting('bootstrap_bootstrap_icons')),
   ];
   $form['fonts']['icons'] = [
     '#type' => 'details',
@@ -1053,7 +1055,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
   $form['fonts']['icons']['bootstrap_icons'] = [
     '#type' => 'select',
     '#title' => t('Icon set'),
-    '#default_value' => theme_get_setting('bootstrap_icons'),
+    '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('bootstrap_icons'), fn() => theme_get_setting('bootstrap_icons')),
     '#empty_option' => t('None'),
     '#options' => [
       'material_design_icons' => t('Material Design Icons'),
@@ -1064,10 +1066,9 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $
 
 /**
  * @param $form
- * @param FormStateInterface $form_state
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
  * @return mixed
  */
-function colorCallback($form, FormStateInterface $form_state)
-{
+function colorCallback($form, FormStateInterface $form_state) {
   return $form['colors']['scheme']['color_container'];
 }
