import * as _angular_core from '@angular/core';
import { InjectionToken, EnvironmentProviders, OnDestroy } from '@angular/core';
import { ClassValue } from 'clsx';
import { ExternalToast } from '@shival99/ngx-sonner';
import * as class_variance_authority_types from 'class-variance-authority/types';
import { VariantProps } from 'class-variance-authority';

type ZToastTheme = 'light' | 'dark' | 'system';
type ZToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
type ZToastDir = 'ltr' | 'rtl' | 'auto';
type ZToastType = 'default' | 'success' | 'error' | 'warning' | 'info' | 'loading';
declare const Z_TOAST_DATA: InjectionToken<any>;
declare const Z_TOASTER_CONFIG: InjectionToken<ZToasterConfig>;
interface ZToastOptions extends ExternalToast {
    description?: string;
    duration?: number;
    id?: string | number;
}
interface ZToastPromiseMessages<T> {
    loading: string;
    success: string | ((data: T) => string);
    error: string | ((error: unknown) => string);
}
interface ZToasterConfig {
    zTheme?: ZToastTheme;
    zPosition?: ZToastPosition;
    zRichColors?: boolean;
    zExpand?: boolean;
    zDuration?: number;
    zVisibleToasts?: number;
    zCloseButton?: boolean;
    zDir?: ZToastDir;
}
declare const Z_TOASTER_DEFAULT_CONFIG: ZToasterConfig;

declare class ZToastComponent {
    private readonly _themeService;
    private readonly _config;
    readonly class: _angular_core.InputSignal<ClassValue>;
    readonly zVariant: _angular_core.InputSignal<"default" | "success" | "error" | "warning" | "info" | null | undefined>;
    readonly zTheme: _angular_core.InputSignal<ZToastTheme | undefined>;
    readonly zPosition: _angular_core.InputSignal<ZToastPosition | undefined>;
    readonly zRichColors: _angular_core.InputSignal<boolean | undefined>;
    readonly zExpand: _angular_core.InputSignal<boolean | undefined>;
    readonly zDuration: _angular_core.InputSignal<number | undefined>;
    readonly zVisibleToasts: _angular_core.InputSignal<number | undefined>;
    readonly zCloseButton: _angular_core.InputSignal<boolean | undefined>;
    readonly zToastOptions: _angular_core.InputSignal<ZToastOptions>;
    readonly zDir: _angular_core.InputSignal<ZToastDir | undefined>;
    protected readonly effectiveTheme: _angular_core.Signal<ZToastTheme>;
    protected readonly effectivePosition: _angular_core.Signal<ZToastPosition>;
    protected readonly effectiveRichColors: _angular_core.Signal<boolean>;
    protected readonly effectiveExpand: _angular_core.Signal<boolean>;
    protected readonly effectiveDuration: _angular_core.Signal<number>;
    protected readonly effectiveVisibleToasts: _angular_core.Signal<number>;
    protected readonly effectiveCloseButton: _angular_core.Signal<boolean>;
    protected readonly effectiveDir: _angular_core.Signal<ZToastDir>;
    protected readonly zClasses: _angular_core.Signal<string>;
    protected readonly detectTheme: _angular_core.Signal<"light" | "dark">;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZToastComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZToastComponent, "z-toast, z-toaster", ["zToast"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zVariant": { "alias": "zVariant"; "required": false; "isSignal": true; }; "zTheme": { "alias": "zTheme"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zRichColors": { "alias": "zRichColors"; "required": false; "isSignal": true; }; "zExpand": { "alias": "zExpand"; "required": false; "isSignal": true; }; "zDuration": { "alias": "zDuration"; "required": false; "isSignal": true; }; "zVisibleToasts": { "alias": "zVisibleToasts"; "required": false; "isSignal": true; }; "zCloseButton": { "alias": "zCloseButton"; "required": false; "isSignal": true; }; "zToastOptions": { "alias": "zToastOptions"; "required": false; "isSignal": true; }; "zDir": { "alias": "zDir"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

/**
 * Provides global toast configuration options
 * Use this in app.config.ts: providers: [provideZToast({ zPosition: 'top-right' })]
 *
 * @param config - Partial configuration to override default options
 * @returns EnvironmentProviders for the toast service
 *
 * @example
 * ```typescript
 * // In app.config.ts
 * export const appConfig: ApplicationConfig = {
 *   providers: [
 *     provideZToast({
 *       zPosition: 'top-right',
 *       zDuration: 5000,
 *       zCloseButton: true,
 *     }),
 *   ],
 * };
 * ```
 */
declare function provideZToast(config?: Partial<ZToasterConfig>): EnvironmentProviders;

declare class ZToastService implements OnDestroy {
    private readonly _overlay;
    private readonly _injector;
    private readonly _platformId;
    private readonly _document;
    private readonly _ngZone;
    private readonly _providedConfig;
    private readonly _zTranslate;
    private _overlayRef;
    private _toasterAttached;
    private _mutationObserver;
    create(config?: ZToasterConfig): void;
    show(message: string, options?: ZToastOptions): string | number;
    success(message: string, options?: ZToastOptions): string | number;
    error(message: string, options?: ZToastOptions): string | number;
    warning(message: string, options?: ZToastOptions): string | number;
    info(message: string, options?: ZToastOptions): string | number;
    loading(message: string, options?: ZToastOptions): string | number;
    promise<T>(promise: Promise<T>, messages: ZToastPromiseMessages<T>): string | number | undefined;
    dismiss(toastId?: string | number): void;
    dismissAll(): void;
    destroy(): void;
    ngOnDestroy(): void;
    private _ensureToasterAttached;
    private _moveToTop;
    private _setupOverlayObserver;
    private _disconnectObserver;
    private _attachToaster;
    private _createOverlay;
    private _translate;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZToastService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<ZToastService>;
}

declare const zToastVariants: (props?: ({
    zVariant?: "default" | "success" | "error" | "warning" | "info" | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
type ZToastVariants = VariantProps<typeof zToastVariants>;

export { ZToastComponent, ZToastService, Z_TOASTER_CONFIG, Z_TOASTER_DEFAULT_CONFIG, Z_TOAST_DATA, provideZToast, zToastVariants };
export type { ZToastDir, ZToastOptions, ZToastPosition, ZToastPromiseMessages, ZToastTheme, ZToastType, ZToastVariants, ZToasterConfig };
