import type MapView from "@arcgis/core/views/MapView.js";
import type { ErrorStrings, LocaleInfo, UtilsStrings, SupportedLocalesForFormats } from "./interfaces.js";

/**
 * Finds the locale info of the closest element to the given element.
 *
 * @param element - The element to get the locale info from.
 * @internal
 */
export function getLocaleInfo(element?: HTMLElement): LocaleInfo;

/**
 * Converts the given `timeZone` from ArcGIS `MapView` to a valid time zone string.
 *
 * @param timeZone
 * @internal
 */
export function convertTimeZone(timeZone: MapView["timeZone"] | undefined): string | undefined;

/**
 * Returns the date string in the Calcite date picker's expected format `YYYY-MM-DD` based on the given date and time zone.
 *
 * @param date
 * @param timeZone
 * @internal
 */
export function getDateStringInCalciteDatePickerFormat(date: Date, timeZone: string): string;

/**
 * Returns the time string in the Calcite time picker's expected format `HH:mm` based on the given date and time zone.
 *
 * @param date
 * @param timeZone
 * @internal
 */
export function getTimeStringInCalciteTimePickerFormat(date: Date, timeZone: string): string;

/**
 * Performs locale aware parse float
 *
 * @param localizedString - string that has to be parsed
 * @param locale - locale used for parsing the float
 * @internal
 */
export function localeParseFloat(localizedString: string, locale?: string): number;

/**
 * Gets the format locale from the given element.
 *
 * @param element - HTMLElement to get the locale from
 * @internal
 */
export function getElementFormatLocale(element: HTMLElement): SupportedLocalesForFormats;

/**
 * Returns a default `CommonStrings` t9n object.
 * This is used by the chart components unit tests and the charts-js Storybook demos.
 *
 * @internal
 */
export function getDefaultErrorsStrings(): Promise<ErrorStrings>;

/**
 * Returns a default `UtilsStrings` t9n object.
 * This is used by the chart components unit tests and the charts-js Storybook demos.
 *
 * @internal
 */
export function getDefaultUtilsStrings(): Promise<UtilsStrings>;