import 'dayjs/locale/nl'; import type { SupportedLocale } from '../../utils/i18n'; import type { ILiftStatusSensorResponse } from '../../utils/types'; export interface IEnergyUsageRow { /** The bucket label, used as the band scale's x value. */ week: string; kwh: number; } /** * The week a bucket covers, as `1 Sep - 7 Sep 25`. The API buckets on * `resolution: "week"` and `date_value` is the bucket start, so the label spans * seven days from it. It must not be re-derived with `startOf("week")`: that * follows the browser locale (Monday for nl, Sunday for en), which would label * the same bucket as two different weeks depending on who is looking. */ export declare const getWeekLabel: (dateValue: string, locale: SupportedLocale) => string; /** * The plottable rows of the energy series. Only the first sensor of the * response is read, the request asks for a single one. */ export declare const toChartRows: (response: ILiftStatusSensorResponse[] | undefined, locale: SupportedLocale) => IEnergyUsageRow[]; /** A meter that never moved reports rows of zeroes, which is not a chart. */ export declare const hasUsage: (rows: IEnergyUsageRow[]) => boolean;