import { ResourceType } from '@aurelia/kernel'; import { type Scope } from '@aurelia/runtime'; import type { Constructable, IContainer, IServiceLocator, PartialResourceDefinition, ResourceDefinition } from '@aurelia/kernel'; import { type IResourceKind } from './resources-shared'; import { IBinding } from '../binding/interfaces-bindings'; export type PartialBindingBehaviorDefinition = PartialResourceDefinition; export type BindingBehaviorStaticAuDefinition = PartialBindingBehaviorDefinition & { type: 'binding-behavior'; }; export type BindingBehaviorType = ResourceType; export type BindingBehaviorInstance = { type?: 'instance' | 'factory'; bind?(scope: Scope, binding: IBinding, ...args: unknown[]): void; unbind?(scope: Scope, binding: IBinding, ...args: unknown[]): void; } & T; export type BindingBehaviorKind = IResourceKind & { isType(value: T): value is (T extends Constructable ? BindingBehaviorType : never); define(name: string, Type: T): BindingBehaviorType; define(def: PartialBindingBehaviorDefinition, Type: T): BindingBehaviorType; define(nameOrDef: string | PartialBindingBehaviorDefinition, Type: T): BindingBehaviorType; getDefinition(Type: T): BindingBehaviorDefinition; find(container: IContainer, name: string): BindingBehaviorDefinition | null; get(container: IServiceLocator, name: string): BindingBehaviorInstance; }; export type BindingBehaviorDecorator = (Type: T, context: ClassDecoratorContext) => BindingBehaviorType; export declare function bindingBehavior(definition: PartialBindingBehaviorDefinition): BindingBehaviorDecorator; export declare function bindingBehavior(name: string): BindingBehaviorDecorator; export declare function bindingBehavior(nameOrDef: string | PartialBindingBehaviorDefinition): BindingBehaviorDecorator; export declare class BindingBehaviorDefinition implements ResourceDefinition { readonly Type: BindingBehaviorType; readonly name: string; readonly aliases: readonly string[]; readonly key: string; private constructor(); static create(nameOrDef: string | PartialBindingBehaviorDefinition, Type: BindingBehaviorType): BindingBehaviorDefinition; register(container: IContainer, aliasName?: string | undefined): void; } export declare const BindingBehavior: Readonly; //# sourceMappingURL=binding-behavior.d.ts.map