/**
 * @module TimeSpan
 */
import { type ISerializable } from "../../serde/contracts/_module.js";
import { TO_MILLISECONDS, type ITimeSpan } from "../../time-span/contracts/_module.js";
import { type IComparable } from "../../utilities/_module.js";
/**
 * IMPORT_PATH: `"@daiso-tech/core/time-span"`
 * @group Implementations
 */
export type SerializedTimeSpan = {
    version: "1";
    timeInMs: number;
};
/**
 * IMPORT_PATH: `"@daiso-tech/core/time-span"`
 * @group Implementations
 */
export type TimeSpanFromDateRangeSettings = {
    /**
     * @default
     * ```ts
     * new Date()
     * ```
     */
    start?: Date;
    /**
     * @default
     * ```ts
     * new Date()
     * ```
     */
    end?: Date;
};
/**
 * The `TimeSpan` class is used for representing time interval.
 * `TimeSpan` class cannot be negative, if you pass negative number it will be converted to 0.
 *
 * IMPORT_PATH: `"@daiso-tech/core/time-span"`
 * @group Implementations
 */
export declare class TimeSpan implements ITimeSpan, ISerializable<SerializedTimeSpan>, IComparable<ITimeSpan> {
    private readonly milliseconds;
    private static secondInMilliseconds;
    private static minuteInMilliseconds;
    private static hourInMilliseconds;
    private static dayInMilliseconds;
    static deserialize(serializedValue: SerializedTimeSpan): TimeSpan;
    private constructor();
    equals(value: ITimeSpan): boolean;
    gt(value: ITimeSpan): boolean;
    gte(value: ITimeSpan): boolean;
    lt(value: ITimeSpan): boolean;
    lte(value: ITimeSpan): boolean;
    serialize(): SerializedTimeSpan;
    /**
     * Converts it to readable string
     */
    toString(): string;
    static fromMilliseconds(milliseconds: number): TimeSpan;
    static fromSeconds(seconds: number): TimeSpan;
    static fromMinutes(minutes: number): TimeSpan;
    static fromHours(hours: number): TimeSpan;
    static fromDays(days: number): TimeSpan;
    static fromTimeSpan(timeSpan: ITimeSpan): TimeSpan;
    static fromDateRange({ start, end, }: TimeSpanFromDateRangeSettings): TimeSpan;
    /**
     * Create a `TimeSpan` from `string`
     *
     * @example
     * ```ts
     * // Will be 5000 milliseconds.
     * TimeSpan.fromStr("5s").toMilliseconds()
     * ```
     *
     * Under the hood, this method leverages [@lukeed/ms](https://www.npmjs.com/package/@lukeed/ms) package to convert various time formats into milliseconds.
     * Refer to its documentation for a complete list of supported time formats and units.
     */
    static fromStr(timeAsStr: string): TimeSpan;
    addMilliseconds(milliseconds: number): TimeSpan;
    addSeconds(seconds: number): TimeSpan;
    addMinutes(minutes: number): TimeSpan;
    addHours(hours: number): TimeSpan;
    addDays(days: number): TimeSpan;
    addTimeSpan(timeSpan: ITimeSpan): TimeSpan;
    subtractMilliseconds(milliseconds: number): TimeSpan;
    subtractSeconds(seconds: number): TimeSpan;
    subtractMinutes(minutes: number): TimeSpan;
    subtractHours(hours: number): TimeSpan;
    subtractDays(days: number): TimeSpan;
    subtractTimeSpan(timeSpan: ITimeSpan): TimeSpan;
    multiply(value: number): TimeSpan;
    divide(value: number): TimeSpan;
    [TO_MILLISECONDS](): number;
    toMilliseconds(): number;
    toSeconds(): number;
    toMinutes(): number;
    toHours(): number;
    toDays(): number;
    /**
     * Will return endDate relative to a given `startDate` argument.
     *
     * @default
     * ```ts
     * new Date()
     * ```
     */
    toEndDate(startDate?: Date): Date;
    /**
     * Will return startDate relative to a given `endDate` argument.
     *
     * @default
     * ```ts
     * new Date()
     * ```
     */
    toStartDate(endDate?: Date): Date;
}
