import { IKosDataModel } from '../../../../core';
import { BaseRegionResponse, RegionsResponse, Unit } from '../services';
/**
 * Unit conversion source specification for the conversion system.
 *
 * Flexible specification allowing conversion by specific unit name or by
 * measurement system with automatic unit selection. The conversion system
 * intelligently selects appropriate default units when only system/measure is provided.
 *
 * @example Specific Unit Conversion
 * ```typescript
 * const fahrenheitSource: UnitSource = { unit: 'fahrenheit' };
 * const celsiusSource: UnitSource = { unit: 'celsius' };
 *
 * const result = regionModel.convert(72, fahrenheitSource, celsiusSource);
 * console.log(result); // '22.22'
 * ```
 *
 * @example System-Based Conversion (Auto Unit Selection)
 * ```typescript
 * const imperialLength: UnitSource = { measure: 'length', system: 'imperial' };
 * const metricLength: UnitSource = { measure: 'length', system: 'metric' };
 *
 * // Automatically uses miles → kilometers
 * const result = regionModel.convert(5, imperialLength, metricLength);
 * console.log(result); // '8.047'
 * ```
 *
 * @kosService core.region-info
 * @group KOS Model
 * @category Region Info
 * @kosApiLevel 2
 */
export interface UnitSource {
    /** Measurement system identifier (e.g., 'metric', 'imperial', 'us') */
    system?: string;
    /** Type of measurement (e.g., 'length', 'weight', 'temperature', 'volume') */
    measure?: string;
    /** Specific unit name (e.g., 'meter', 'kilogram', 'fahrenheit') */
    unit?: string;
}
/**
 * Key type for measure maps — a string or the literal 'default'.
 *
 * @kosService core.region-info
 */
export type MeasureMapKeys = string | "default";
/**
 * Record mapping MeasureMapKeys to Unit, defining units for each measurement system.
 *
 * @kosService core.region-info
 */
export type SystemMeasureMap = Record<MeasureMapKeys, Unit>;
/**
 * Record mapping measurement types to their respective SystemMeasureMap.
 *
 * @kosService core.region-info
 */
export type MeasureMap = Record<string, SystemMeasureMap>;
/**
 * Record mapping strings, typically used for default settings.
 *
 * @kosService core.region-info
 */
export type SystemDefaultMap = Record<string, string>;
/**
 * Record mapping unit systems to their default settings.
 *
 * @kosService core.region-info
 */
export type DefaultMeasureMap = Record<string, SystemDefaultMap>;
/**
 * Configuration options for creating RegionInfoModel instances.
 *
 * Currently an empty interface but reserved for future regional configuration
 * options such as default locale preferences, custom unit mappings, or
 * regional API endpoints.
 *
 * @example
 * ```typescript
 * const options: RegionInfoOptions = {
 *   // Future options will be defined here
 * };
 * const regionModel = RegionInfo.instance().options(options).build();
 * ```
 *
 * @kosService core.region-info
 * @group KOS Model
 * @category Region Info
 */
export interface RegionInfoOptions {
}
interface BaseOptions {
    id: string;
}
interface FormatOptions extends BaseOptions {
    format: string;
}
/**
 * Time format configuration options for regional time display.
 *
 * Defines available time formats including 12-hour (AM/PM) and 24-hour formats
 * with their display patterns and behavior.
 *
 * @example
 * ```typescript
 * const timeFormats: TimeFormatOptions[] = [
 *   { id: '12h', format: 'hh:mm:ss a', ampm: true },   // 3:45:30 PM
 *   { id: '24h', format: 'HH:mm:ss', ampm: false }     // 15:45:30
 * ];
 * ```
 *
 * @kosService core.region-info
 * @group KOS Model
 * @category Region Info
 * @kosApiLevel 2
 */
export interface TimeFormatOptions extends FormatOptions {
    /** True if using 12-hour format with AM/PM, false for 24-hour format */
    ampm: boolean;
}
/**
 * Date format configuration options for regional date display.
 *
 * Defines available date formats including different component ordering
 * (Day/Month/Year vs Month/Day/Year) and display patterns.
 *
 * @example
 * ```typescript
 * const dateFormats: DateFormatOptions[] = [
 *   { id: 'us', format: 'MM/DD/YYYY', order: 'MDY' },    // 03/15/2024
 *   { id: 'eu', format: 'DD/MM/YYYY', order: 'DMY' },    // 15/03/2024
 *   { id: 'iso', format: 'YYYY-MM-DD', order: 'YMD' }    // 2024-03-15
 * ];
 * ```
 *
 * @kosService core.region-info
 * @group KOS Model
 * @category Region Info
 * @kosApiLevel 2
 */
export interface DateFormatOptions extends FormatOptions {
    /** Order of date components: 'MDY', 'DMY', 'YMD', etc. */
    order: string;
}
/**
 * Unit system configuration options for measurement standards.
 *
 * Defines available unit systems (metric, imperial, etc.) with their
 * display names and identification.
 *
 * @example
 * ```typescript
 * const unitSystems: UnitSystemOptions[] = [
 *   { id: 'metric', name: 'Metric System' },
 *   { id: 'imperial', name: 'Imperial System' },
 *   { id: 'us', name: 'US Customary System' }
 * ];
 * ```
 *
 * @kosService core.region-info
 * @group KOS Model
 * @category Region Info
 * @kosApiLevel 2
 */
export interface UnitSystemOptions extends BaseOptions {
    /** Display name of the unit system (e.g., 'Metric System', 'Imperial System') */
    name: string;
}
/**
 * Region Info Model - Comprehensive regional localization and unit conversion system for KOS applications.
 *
 * This singleton model provides centralized management of regional settings including time formats,
 * date formats, unit systems, time zones, and intelligent unit conversion. Essential for building
 * internationally-aware applications that adapt to local preferences and measurement standards.
 *
 * ## Key Features
 * - **Time & Date Formatting** - Configurable 12/24-hour time and various date order formats
 * - **Unit System Management** - Complete metric/imperial conversion with precision control
 * - **Time Zone Support** - Full time zone management with regional associations
 * - **Dynamic Configuration** - Live updates through KOS configuration system
 * - **Type Safety** - Generic support for additional regional data
 * - **Singleton Pattern** - Single instance manages all regional settings
 *
 * ## Unit Conversion System
 * The model provides intelligent unit conversion between different measurement systems:
 * - **Automatic scaling** - Handles complex conversions with proper scaling factors
 * - **Precision control** - Configurable decimal places per unit type
 * - **Family validation** - Prevents invalid conversions (e.g., length to weight)
 * - **Default unit resolution** - Automatic selection of appropriate units per system
 *
 * @template AdditionalData - Extends BaseRegionResponse for custom regional data requirements
 *
 * @interface
 * @example Basic Usage
 * ```typescript
 * const regionModel = RegionInfo.instance().build();
 *
 * // Unit conversion and regional settings
 * const celsius = regionModel.convert(72, { unit: 'fahrenheit' }, { unit: 'celsius' });
 * console.log(regionModel.selectedCountry);     // 'us'
 * ```
 *
 * @kosService core.region-info
 * @group KOS Model
 * @category Region Info
 * @useDeclaredType
 *
 * @see {@link UnitSource} - Unit conversion source specification
 * @see {@link RegionInfoOptions} - Configuration options for RegionInfoModel instances
 * @kosApiLevel 2
 */
export interface RegionInfoModel<AdditionalData extends BaseRegionResponse = BaseRegionResponse> extends RegionInfoOptions, IKosDataModel {
    /** Unique identifier for the region model instance. */
    readonly id: string;
    /** The default unit system (e.g., metric or imperial) for the region. */
    readonly defaultUnitSystem: string;
    /** The currently selected unit system. */
    readonly selectedUnitSystem: string;
    /** The currently selected time format as a string. */
    readonly selectedTimeFormat: string;
    /** The currently selected date format as a string. */
    readonly selectedDateFormat: string;
    /** The order of date elements (e.g., day/month/year) for the selected format. */
    readonly selectedDateOrder: string;
    /** The currently selected country. */
    readonly selectedCountry: string;
    /** The currently selected time zone. */
    readonly selectedTimeZone: string;
    /**
     * @kosApiLevel 22
     */
    readonly serviceBasePath: string;
    /**
     * The detailed information of the selected region, extended with additional data.
     * The type of additional data is determined by the generic parameter `AdditionalData`.
     */
    selectedRegion: RegionsResponse<AdditionalData>;
    /** Flag indicating if the 12-hour time format (AM/PM) is used. */
    is12HourTimeFormat: boolean;
    /** An array of available regions as strings. */
    availableRegions: string[];
    /** Identifier of the region. */
    regionId: string;
    readonly dateFormatId: string;
    readonly timeFormatId: string;
    readonly unitSystemId: string;
    /** An array of available time zones as strings. */
    timeZones: string[];
    /** An array of all available time zones as strings. */
    allTimeZones: string[];
    /** Time format options available for selection. */
    readonly timeFormatOptions: TimeFormatOptions[];
    /** Date format options available for selection. */
    readonly dateFormatOptions: DateFormatOptions[];
    /** Unit system options available for selection. */
    readonly unitSystemOptions: UnitSystemOptions[];
    /**
     * Converts a value from one unit to another.
     *
     * @param value - The numerical value to convert.
     * @param from - The unit source to convert from.
     * @param to - The unit source to convert to.
     * @returns The converted value as a string.
     * @internal
     */
    convert(value: number, from: UnitSource, to: UnitSource): string;
    /**
     * Sets the selected time format.
     *
     * @param id - The identifier of the time format to select.
     */
    setSelectedTimeFormat(id: string): void;
    /**
     * Sets the selected date format.
     *
     * @param id - The identifier of the date format to select.
     */
    setSelectedDateFormat(id: string): void;
    /**
     * Sets the selected unit system.
     *
     * @param id - The identifier of the unit system to select.
     */
    setSelectedUnitSystem(id: string): void;
    /**
     * Retrieves the default unit for a given measure in a specified unit system.
     *
     * @param measure - The measure for which to get the default unit.
     * @param unitSystem - The unit system in which to find the default unit.
     * @returns The default unit for the specified measure and system.
     */
    getDefaultUnitForMeasure(measure: string, unitSystem: string): string;
    /**
     * Retrieves the measure associated with a given unit.
     *
     * @param unit - The unit for which to get the measure.
     * @returns The measure associated with the specified unit.
     *
     * @internal
     */
    getUnitMeasure: (unit: string) => string;
    /**
     *
     * @internal
     */
    getUnitSystem: (unit?: string) => string;
    /**
     * Retrieves the default number of decimal places for a unit in a given measure and system.
     *
     * @param measure - The measure to consider.
     * @param unitSystem - The unit system in which the unit is defined.
     * @param unit - Optional specific unit to consider.
     * @returns The number of decimal places for the unit.
     */
    getDefaultUnitDecimalPlaces(measure: string, unitSystem: string, unit?: string): number;
}
/**
 * Enum for keys used in UnitTuple.
 *
 * @kosService core.region-info
 */
export declare enum UnitTupleKeys {
    family = 0,
    scale = 1,
    offset = 2,
    decimals = 3,
    alias = 4,
    system = 5
}
/**
 * Tuple type for unit properties: family, scale, offset, decimals, alias.
 *
 * @kosService core.region-info
 */
export type UnitTuple = [
    family: string,
    scale: number,
    offset: number,
    decimals: number,
    alias: string,
    system: string
];
export {};
//# sourceMappingURL=index.d.ts.map