import { AsyncDirective, type ElementPart, type PartInfo, type AttributePart, type BooleanAttributePart, type PropertyPart, type ReactiveElement, type DirectiveResult } from '../index.js'; import '@a11d/key-path'; export declare enum BindingMode { /** * Indicates a one-way binding from the data source to the target property. * This is the default mode when the source is read-only. */ OneWay = "one-way", /** * Indicates a two-way binding between the data source and the target property. * This is the default mode when neither the source nor target is read-only. */ TwoWay = "two-way", /** * Indicates a one-way binding from the target property to the data source. * This is the default mode when the target is read-only. */ OneWayToSource = "one-way-to-source" } /** * The source a binding can be established on. * * Besides `ReactiveElement`s this includes any context which forwards its updates to a host, * such as a `ComponentPart`, so bindings can be declared in a part's template as well. */ export type BindSource = Pick; export type BindDirectiveParameters = [ component: Component, property: Property, options?: BindDirectiveParametersOptions ]; export type BindDirectiveParametersOptions = { keyPath?: KeyPath.Of; mode?: BindingMode; event?: string; sourceUpdate?: (value: Data) => void; sourceUpdated?: (value: Data) => void; }; type BindDirectivePart = ElementPart | AttributePart | BooleanAttributePart | PropertyPart; declare class BindDirective extends AsyncDirective { #private; constructor(partInfo: PartInfo); render(): unknown; update(part: BindDirectivePart, parameters: BindDirectiveParameters): unknown; disconnected(): void; reconnected(): void; } export declare const bind: (...parameters: BindDirectiveParameters) => DirectiveResult>; export {}; //# sourceMappingURL=BindDirective.d.ts.map