/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
/**
 * Allows you to define different types of units with unitName and
 * multiplier that converts to baseUnit.
 */
export declare abstract class Unit {
    private multiplier;
    private unitName;
    private readonly _multiplier;
    private readonly _unitName;
    /**
     * @param multiplier - Value that is used to convert this to base unit
     * @param unitName - Name of the Unit. Also used to construct translation
     * keys for each type of Unit.
     */
    constructor(multiplier: number, unitName: string);
    getMultiplier(): number;
    getUnitName(): string;
    /**
     * Returns the value in outputUnit for this unit
     * @param value - Value of this unit
     * @param outputUnit - Unit to which value is converted
     */
    getOutputValue(value: any, outputUnit: Unit): number;
    /**
     * Returns the value in base unit for this unit
     * @param value - Value of this unit
     */
    getBaseValue(value: number): number;
    /**
     * Translation key to be used when displaying value with unit
     *
     * Ex: 25 MB, 100 %, 2 GHz
     */
    abstract getValueWithUnitTranslationKey(): string;
    /**
     * Translation key to be used when displaying unitName
     *
     * Ex: MB, B, GHz, MHz, %
     */
    abstract getUnitNameTranslationKey(): string;
    /**
     * Returns the best unit out of available units for given value of current unit
     *
     * Best unit is a Unit whose converted value is less than 1000
     *
     * @param value - Value of this unit
     * @param availableUnits - List of available Units out of which best unit is calculated
     */
    abstract findBestUnit(value: number, availableUnits: Unit[]): Unit;
}
/**
 * Finds the bestUnit by trying groups of the comparison number
 */
declare abstract class NumberUnit extends Unit {
    /**
     * Calculates the best unit out of available units to display in UI cell for a given input Unit
     * and value
     *
     * Best unit is a Unit whose converted value is less than the comparison number
     *
     * @param value - Value of input Unit
     * @param availableUnits - Array of available Units to display in UI cell
     * availableUnits array should be pre-sorted ascending by multiplier
     *
     */
    findBestUnit(value: number, availableUnits?: NumberUnit[]): Unit;
    abstract getAllUnitTypes(): NumberUnit[];
    /**
     * Returns the number that you multiply by to get the next order unit.
     *
     * @example 1024 would be the multiplier for Byte.
     */
    protected abstract getUnitMultiplier(): number;
}
/**
 * Finds the bestUnit by trying groups of 1000
 */
export declare abstract class ThousandsUnit extends NumberUnit {
    getUnitMultiplier(): number;
}
/**
 * Finds the bestUnit by trying groups of 1024
 */
export declare abstract class PowerTwoUnit extends NumberUnit {
    getUnitMultiplier(): number;
}
export declare class Hertz extends ThousandsUnit {
    static valueWithUnitTranslationKeyPrefix: string;
    static unitNameTranslationKeyPrefix: string;
    static Hz: Hertz;
    static Khz: Hertz;
    static Mhz: Hertz;
    static Ghz: Hertz;
    static Thz: Hertz;
    static types: Hertz[];
    getAllUnitTypes(): Hertz[];
    getValueWithUnitTranslationKey(): string;
    getUnitNameTranslationKey(): string;
}
export declare class Bytes extends PowerTwoUnit {
    static valueWithUnitTranslationKeyPrefix: string;
    static unitNameTranslationKeyPrefix: string;
    static B: Bytes;
    static KB: Bytes;
    static MB: Bytes;
    static GB: Bytes;
    static TB: Bytes;
    static types: Bytes[];
    getAllUnitTypes(): Bytes[];
    getValueWithUnitTranslationKey(): string;
    getUnitNameTranslationKey(): string;
}
/**
 * Percent is handled differently compared to other Units.
 * Can be represented in two different formats -
 * {@link ZERO_TO_100} - ex: 50 %
 * {@link ZERO_TO_1} - ex: 0.5 %
 * In both formats single unitName - "%" is used represent the value
 */
export declare class Percent extends Unit {
    static valueWithUnitTranslationKey: string;
    static unitTranslationKey: string;
    /**
     * Percent always has unitName as "%"
     */
    constructor(multiplier: number);
    static ZERO_TO_1: Percent;
    static ZERO_TO_100: Percent;
    getValueWithUnitTranslationKey(): string;
    getUnitNameTranslationKey(): string;
    /**
     * Percent is always best represented in ZERO_TO_100 format
     * and so returns {@link ZERO_TO_100}
     *
     * Ex: 50 % is the display format for ZERO_TO_100 for value - 50
     */
    findBestUnit(value: number, unitList: Unit[]): Unit;
}
export {};
