import styled , { css } from 'reshadow' ; import { Translate } from '@cloudbeaver/core-localization' ; import { composes , useStyles } from '@cloudbeaver/core-theming' ; import type { NavigationNodeRendererComponent } from './NavigationNodeComponent' ; import { NAVIGATION_TREE_CONNECTION_GROUPS } from './navigationTreeConnectionGroupFilter' ; export function navigationTreeConnectionGroupRenderer ( nodeId ) { if ( nodeId !== NAVIGATION_TREE_CONNECTION_GROUPS . manageable && nodeId !== NAVIGATION_TREE_CONNECTION_GROUPS . unmanageable ) { return ; } if ( nodeId === NAVIGATION_TREE_CONNECTION_GROUPS . manageable ) { return ManageableGroup ; } return UnManageableGroup ; } const styles = composes ( css `
    connection-group {
      composes: theme-text-text-hint-on-light from global;
    }
  ` , css `
    connection-group {
      composes: theme-typography--caption from global;
      padding: 4px 12px;

      &:not(:first-child) {
        margin-top: 8px;
      }
    }
  ` ) ; const ManageableGroup = function ManageableGroup ( ) { return styled ( useStyles ( styles ) ) ( < connection - group > < Translate token = 'app_navigationTree_connection_group_user' / > < /connection-group>); } ; const UnManageableGroup = function UnManageableGroup ( ) { return styled ( useStyles ( styles ) ) ( < connection - group > < Translate token = 'app_navigationTree_connection_group_shared' / > < /connection-group>); } ;