import * as _angular_core from '@angular/core'; import { Signal, Provider } from '@angular/core'; import { NumberInput } from '@angular/cdk/coercion'; import * as ng_primitives_state from 'ng-primitives/state'; /** * Apply the `ngpAvatarFallback` directive to an element that represents the user in the absence of an image. This is typically the user's initials. */ declare class NgpAvatarFallback { /** * Access the global configuration. */ private readonly config; /** * Define a delay before the fallback is shown. This is useful to only show the fallback for those with slower connections. * @default 0 */ readonly delay: _angular_core.InputSignalWithTransform; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } interface NgpAvatarFallbackState { } interface NgpAvatarFallbackProps { /** * The delay before showing the fallback. */ delay?: Signal; } declare const NgpAvatarFallbackStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{}>>; declare const ngpAvatarFallback: ({ delay }: NgpAvatarFallbackProps) => {}; declare const injectAvatarFallbackState: { (): Signal<{}>; (options: ng_primitives_state.StateInjectionOptions): Signal<{} | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{}> | Signal<{} | null>; }; declare const provideAvatarFallbackState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; /** * Apply the `ngpAvatarImage` directive to an element that represents the avatar image. This would typically be an `img` element or a `div` with a background image. */ declare class NgpAvatarImage { constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } interface NgpAvatarImageState { } interface NgpAvatarImageProps { } declare const NgpAvatarImageStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{}>>; declare const ngpAvatarImage: ({}: NgpAvatarImageProps) => {}; declare const injectAvatarImageState: { (): _angular_core.Signal<{}>; (options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>; (options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>; }; declare const provideAvatarImageState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpAvatarState { /** * The avatar status. */ status: Signal; /** * Set the avatar status. */ setStatus(status: NgpAvatarStatus): void; } interface NgpAvatarProps { } declare const NgpAvatarStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ status: _angular_core.WritableSignal; setStatus: (newStatus: NgpAvatarStatus) => void; }>>; declare const ngpAvatar: ({}: NgpAvatarProps) => { status: _angular_core.WritableSignal; setStatus: (newStatus: NgpAvatarStatus) => void; }; declare const injectAvatarState: { (): Signal<{ status: _angular_core.WritableSignal; setStatus: (newStatus: NgpAvatarStatus) => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ status: _angular_core.WritableSignal; setStatus: (newStatus: NgpAvatarStatus) => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ status: _angular_core.WritableSignal; setStatus: (newStatus: NgpAvatarStatus) => void; }> | Signal<{ status: _angular_core.WritableSignal; setStatus: (newStatus: NgpAvatarStatus) => void; } | null>; }; declare const provideAvatarState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; declare enum NgpAvatarStatus { Idle = "idle", Loading = "loading", Loaded = "loaded", Error = "error" } /** * Apply the `ngpAvatar` directive to an element that represents the avatar. This directive is a container for the image and/or fallback. */ declare class NgpAvatar { /** * The avatar state. */ private readonly state; /** * Set the avatar status. * @param status The status to set. * @internal */ setStatus(status: NgpAvatarStatus): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } interface NgpAvatarConfig { /** * Define a delay before the fallback is shown. This is useful to only show the fallback for those with slower connections. * @default 0 */ delay: number; } /** * Provide the avatar config * @param config The avatar config * @returns The provider */ declare function provideAvatarConfig(config: Partial): Provider[]; export { NgpAvatar, NgpAvatarFallback, NgpAvatarFallbackStateToken, NgpAvatarImage, NgpAvatarImageStateToken, NgpAvatarStateToken, NgpAvatarStatus, injectAvatarFallbackState, injectAvatarImageState, injectAvatarState, ngpAvatar, ngpAvatarFallback, ngpAvatarImage, provideAvatarConfig, provideAvatarFallbackState, provideAvatarImageState, provideAvatarState }; export type { NgpAvatarConfig, NgpAvatarFallbackProps, NgpAvatarFallbackState, NgpAvatarImageProps, NgpAvatarImageState, NgpAvatarProps, NgpAvatarState };