$errors * @var array $form * @var array $tenant */ use MintyPHP\Session; $values = $form ?? $tenant ?? []; $pageAuth = is_array($viewAuth['page'] ?? null) ? $viewAuth['page'] : []; $canUpdateTenant = (bool) ($pageAuth['can_update_tenant'] ?? false); $canDeleteTenant = (bool) ($pageAuth['can_delete_tenant'] ?? false); $canManageCustomFields = (bool) ($pageAuth['can_manage_custom_fields'] ?? false); $canManageSso = (bool) ($pageAuth['can_manage_sso'] ?? false); $isReadOnly = !$canUpdateTenant; $tenantDescription = trim((string) ($values['description'] ?? '')); $titleText = $tenantDescription !== '' ? $tenantDescription : ($isReadOnly ? t('View tenant') : t('Edit tenant')); $tenantUuid = (string) ($values['uuid'] ?? ''); $tenantLogoService = app(\MintyPHP\Service\Tenant\TenantLogoService::class); $tenantFaviconService = app(\MintyPHP\Service\Tenant\TenantFaviconService::class); $hasLogoLight = $tenantUuid !== '' && $tenantLogoService->hasLogo($tenantUuid, \MintyPHP\Service\Tenant\TenantLogoService::THEME_LIGHT); $hasLogoDark = $tenantUuid !== '' && $tenantLogoService->hasLogo($tenantUuid, \MintyPHP\Service\Tenant\TenantLogoService::THEME_DARK); $hasFavicon = $tenantUuid !== '' && $tenantFaviconService->hasFavicon($tenantUuid); ?>