import type { TServiceParams } from "@digital-alchemy/core"; import type { ByIdProxy, PICK_ENTITY } from "@digital-alchemy/hass"; import type { AddEntityOptions, BasicAddParams, CallbackData, SettableConfiguration, SynapseEntityProxy } from "../../helpers/index.mts"; export type TextConfiguration = { /** * Defines how the text should be displayed in the UI. Can be text or password. */ mode?: "text" | "password"; /** * The maximum number of characters in the text value (inclusive). */ native_max?: number; /** * The minimum number of characters in the text value (inclusive). */ native_min?: number; /** * A regex pattern that the text value must match to be valid. */ pattern?: SettableConfiguration; /** * The value of the text. */ native_value?: SettableConfiguration; /** * default: true */ managed?: boolean; }; export type TextEvents = { set_value: { value: string; }; }; /** * Convenient type for text entities with optional attributes and locals */ export type SynapseText = SynapseEntityProxy, TextEvents, ATTRIBUTES, LOCALS, DATA, PICK_ENTITY<"text">> & { entity: ByIdProxy>; }; export declare function VirtualText({ context, synapse, logger }: TServiceParams): >>({ managed, ...options }: AddEntityOptions, TextEvents, PARAMS["attributes"], PARAMS["locals"], DATA>) => SynapseText;