import type { IconData } from '@gravity-ui/uikit'; import type { VDiskBlobIndexStatParams } from '../../store/reducers/vdisk/vdisk'; import { EFlag } from '../../types/api/enums'; import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk'; import type { DiskColor, PreparedVDisk } from './types'; export declare function isFullVDiskData(disk: PreparedVDisk | TVDiskStateInfo | TVSlotId): disk is PreparedVDisk | TVDiskStateInfo; export declare const getSpaceSeverity: (allocatedPercent?: number) => 9 | 13 | 14 | 15 | 8 | 16 | 12 | 20 | 22 | 6 | 7 | 10 | 11 | 17 | 18 | 19 | 21 | import("./types").DataSeverity; /** * Convert data severity (0-5) to EFlag color. * Used for PreparedVDisk.Severity and PreparedPDisk.Severity in Default mode. * Returns only basic EFlag colors (Grey, Green, Blue, Yellow, Orange, Red). * @param severity - Basic severity level (0-5), or any number (will be clamped to 0-5 range) * @returns EFlag color for visualization */ export declare function getDataSeverityColor(severity: number | undefined): EFlag; /** * Convert display severity (0-22) to disk color. * Used for dynamic coloring in Expert Mode based on grouping strategy. * Handles extended severity ranges for State, Space, FrontQueues, and Compaction modes. * @param severity - Extended severity level (0-22), or any number * @returns Disk color for visualization */ export declare function getDisplaySeverityColor(severity: number | undefined): DiskColor; export declare function getColorSeverity(color?: EFlag): 0 | 1 | 3 | 4 | 9 | 13 | 14 | 15 | 8 | 16 | 2 | 12 | 20 | 22 | 5 | 6 | 7 | 10 | 11 | 17 | 18 | 19 | 21; export declare function getPDiskId({ nodeId, pDiskId, }: { nodeId?: string | number | null; pDiskId?: string | number | null; }): string | undefined; export declare function getVDiskId(params: VDiskBlobIndexStatParams): string; export declare function getVDiskStatusIcon(severity?: number, isDonor?: boolean): IconData | undefined; /** * Build a location key for a VDisk using its physical slot coordinates. * Returns undefined when any coordinate is missing. */ export declare function makeVDiskLocationKey(nodeId?: number, pDiskId?: number, vDiskSlotId?: number): string | undefined; /** * Set Recipient references on donor VDisks pointing back to their acceptor VDisk. * * For every VDisk that has a non-empty Donors array and is NOT Replicated, each donor is matched to a * top-level VDisk by its physical location (NodeId, PDiskId, VDiskSlotId). When a * match is found the top-level donor receives a Recipient reference and its * StringifiedId is kept in sync with the nested donor entry. * * Accepts a callback that iterates over all VDisks to avoid creating intermediate * flat copies. The callback is invoked twice: once to build the location index and * once to resolve donor→recipient links. * * Mutates the VDisks in place. */ export declare function setDonorRecipientReferences(forEachVDisk: (cb: (vDisk: PreparedVDisk) => void) => void): void;