import type { TServiceParams } from "@digital-alchemy/core"; import type { ByIdProxy, PICK_ENTITY } from "@digital-alchemy/hass"; import type { Dayjs } from "dayjs"; import type { AddEntityOptions, BasicAddParams, CallbackData, SettableConfiguration, SynapseEntityProxy } from "../../helpers/index.mts"; export type DateTimeConfiguration = { /** * default: true */ managed?: boolean; date_type?: DATE_TYPE; native_value?: SettableConfiguration, DATA>; }; export type DateTimeEvents = { set_value: { value: VALUE; }; }; type TypeOptions = "dayjs" | "date" | "iso"; type DateTimeParams = BasicAddParams & { date_type?: TypeOptions; }; type CallbackType = D extends "dayjs" ? Dayjs : D extends "date" ? Date : string; /** * Convenient type for datetime entities with optional attributes and locals */ export type SynapseDateTime = SynapseEntityProxy, DateTimeEvents, ATTRIBUTES, LOCALS, DATA, PICK_ENTITY<"datetime">> & { entity: ByIdProxy>; }; type SerializeTypes = string | Date | Dayjs; export declare function VirtualDateTime({ context, synapse, logger }: TServiceParams): >(options: AddEntityOptions, DateTimeEvents, PARAMS["attributes"], PARAMS["locals"], DATA>) => SynapseDateTime; export {};