<?php

/**
 * @file
 * Update function for d_search.
 */

declare(strict_types = 1);

use Drupal\user\RoleInterface;

/**
 * Implements hook_install().
 */
function d_search_install(): void {
  if (\Drupal::moduleHandler()->moduleExists('search')) {
    user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['search content']);
    user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['search content']);
  }
}
