import { Context } from '../context'; import { ContextBindingController } from '../ContextBindingController'; import { ContextConsumerController } from '../ContextConsumerController'; /** * Binds attributes to a context. */ export declare class ContextAttrsController extends ContextBindingController { protected _transformers: Map any>; /** * Binds a context to a attribute on the current `ref` element. By binds we mean as the * context value changes it will update the given attribute on the current `ref` element. * * @param context The context to bind to. * @param attrName The name of the attribute to bind the context to. * @param transformer An optional transformer to transform the context value before it is * stringified and applied as the attribute value. Returning a falsy value such as `null`, * `undefined` or `false` will remove the attribtue. */ bind(context: Context, attrName: string, transformer?: (value: T) => any): this; protected _handleBindToContext(): void; protected _handleBindingUpdate(consumer: ContextConsumerController, attrName: string): void; protected _handleUnbindFromContext(_: ContextConsumerController, attrName: string): void; /** * Override to transform attribute names. */ protected _transformAttrName(attrName: string): string; /** * Override to transform context values. Returning a falsy value such as `null`, `undefined` or * `false` will remove the attribtue. This is provided as the default transformer when one * isn't provided in the `bind()` method call. */ protected _transformAttrValue(attrName: string, value: any): any; }