import { RegionInfoModel, TimeFormatOptions } from '../../models/models/region-info';
import { ChangeEvent } from 'react';
type SelectCallback = string | ChangeEvent<HTMLSelectElement>;
type TimeFormatMap<T extends {} = any> = (format: TimeFormatOptions) => T;
/**
 * The data returned from the useKosRegions hook.
 * @typeParam RegionData - the region data returned from the backend service.  The type must extend BaseRegionResponse from the kos-core-model.
 * @typeParam T - the type of the options returned from the regionMap function.
 */
export interface KosTimeFormatHookData<T extends {} = any> {
    /**the raw region data returned from the backend service. */
    raw: string[];
    /**the region model returned from the backend service. */
    regionModel?: RegionInfoModel;
    /**the currently selected region. */
    selectedTimeFormat: string;
    timeFormatId: string;
    /**a function that can be used to update the region. */
    updateTimeFormat: (e: SelectCallback) => void;
    /**the props that can be spread into a select box component. */
    props: {
        onChange: (e: SelectCallback) => void;
        value: string;
        options: T[];
    };
}
/**
 * A hook that will help manage the use of region information on a dispenser.
 * @typeParam RegionData - the region data returned from the backend service.  The type must extend BaseRegionResponse from the kos-core-model.
 * @param timeFormatMap - a function that maps a region string a structure that can be
 * used as an option in a select box.  The default is to return an option element
 * with the region as the value and label.
 * @returns KosRegionHookData - the data returned from the hook.
 * @example
 * In this example the default region map is used to populate a select box with the available regions.  If using a third party select box component where the options
 * are passed in as a prop, the options property can be spread into the props for the component.   In this case, a region map function could be passed in to map the region
 * to a structure that the component expects.
 *
 *
 * ```typescript
 * interface RegionData extends RegionServices.BaseRegionResponse {
 *  rfidRegion: string;
 * }
 * const { regionSelectProps, regionModel, regionData, selectedRegion, updateRegion } = useKosRegions<RegionData>();
 * const { options, ...selectAttributes } = regionSelectProps;
 * ...
 * <div>
 *   <label>Select region: </label>
 *   <select {...selectAttributes}>{options}</select>
 * </div>
 * <div>Selected Region: {selectedRegion}</div>
 * <div>Region Data: {regionData?.rfidRegion}</div>
 * ```
 */
export declare const useKosTimeFormats: <T extends {} = any>(timeFormatMap?: TimeFormatMap<T>) => KosTimeFormatHookData<T>;
export {};
//# sourceMappingURL=use-kos-time-formats.d.ts.map