import * as _angular_core from '@angular/core';
import { OnDestroy } from '@angular/core';
import { ZIcon } from '@shival99/z-ui/components/z-icon';
import { ClassValue } from 'clsx';
import * as class_variance_authority_types from 'class-variance-authority/types';
import { VariantProps } from 'class-variance-authority';

type ZChatRole = 'user' | 'assistant';
type ZChatPosition = 'bottom-right' | 'bottom-left';
type ZChatSize = 'sm' | 'default' | 'lg';
interface ZChatOffset {
    top?: number | string;
    right?: number | string;
    bottom?: number | string;
    left?: number | string;
}
interface ZChatAttachment {
    id: string;
    name: string;
    size: number;
    type: string;
    previewUrl?: string;
    file?: File;
}
interface ZChatMessage {
    id: string;
    role: ZChatRole;
    content: string;
    createdAt: number;
    files?: ZChatAttachment[];
}
interface ZChatSuggestion {
    label: string;
    prompt?: string;
    icon?: ZIcon;
}
interface ZChatSendEvent {
    message: string;
    files: ZChatAttachment[];
    messages: ZChatMessage[];
}

declare class ZChatComponent implements OnDestroy {
    readonly class: _angular_core.InputSignal<ClassValue>;
    readonly zOpen: _angular_core.ModelSignal<boolean>;
    readonly zMessages: _angular_core.ModelSignal<ZChatMessage[]>;
    readonly zTitle: _angular_core.InputSignal<string>;
    readonly zSubtitle: _angular_core.InputSignal<string>;
    readonly zPlaceholder: _angular_core.InputSignal<string>;
    readonly zPosition: _angular_core.InputSignal<ZChatPosition>;
    readonly zOffset: _angular_core.InputSignal<ZChatOffset>;
    readonly zSize: _angular_core.InputSignal<ZChatSize>;
    readonly zSuggestions: _angular_core.InputSignal<ZChatSuggestion[]>;
    readonly zShowSuggestions: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
    readonly zShowPulse: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
    readonly zDisabled: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
    readonly zLoading: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
    readonly zAllowAttachments: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
    readonly zAcceptedFiles: _angular_core.InputSignal<string>;
    readonly zAutoReply: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
    readonly zAutoReplyDelay: _angular_core.InputSignal<number>;
    readonly zFabIcon: _angular_core.InputSignal<ZIcon>;
    readonly zBotIcon: _angular_core.InputSignal<ZIcon>;
    readonly zSendIcon: _angular_core.InputSignal<ZIcon>;
    readonly zSend: _angular_core.OutputEmitterRef<ZChatSendEvent>;
    readonly zResponse: _angular_core.OutputEmitterRef<ZChatMessage>;
    readonly zToggle: _angular_core.OutputEmitterRef<boolean>;
    readonly zClear: _angular_core.OutputEmitterRef<void>;
    protected readonly draftMessage: _angular_core.WritableSignal<string>;
    protected readonly showRipple: _angular_core.WritableSignal<boolean>;
    protected readonly attachments: _angular_core.WritableSignal<ZChatAttachment[]>;
    protected readonly isComposerExpanded: _angular_core.WritableSignal<boolean>;
    protected readonly isComposerOverflowing: _angular_core.WritableSignal<boolean>;
    protected readonly isPreviewVisible: _angular_core.WritableSignal<boolean>;
    protected readonly previewImage: _angular_core.WritableSignal<{
        url: string;
        name: string;
        size: number;
    } | null>;
    private readonly _mockTyping;
    private readonly _messagesScrollbarRef;
    private readonly _chatInputRef;
    private readonly _fileInputRef;
    private _mockReplyTimer;
    private _rippleTimer;
    private _scrollTimer;
    protected readonly wrapperClasses: _angular_core.Signal<string>;
    protected readonly wrapperTop: _angular_core.Signal<string | null>;
    protected readonly wrapperRight: _angular_core.Signal<string | null>;
    protected readonly wrapperBottom: _angular_core.Signal<string | null>;
    protected readonly wrapperLeft: _angular_core.Signal<string | null>;
    protected readonly panelClasses: _angular_core.Signal<string>;
    protected readonly fabClasses: _angular_core.Signal<string>;
    protected readonly isTyping: _angular_core.Signal<boolean>;
    protected readonly canSend: _angular_core.Signal<boolean>;
    protected readonly hasMessages: _angular_core.Signal<boolean>;
    protected readonly showEmptyState: _angular_core.Signal<boolean>;
    protected readonly previewImageSizeLabel: _angular_core.Signal<string>;
    ngOnDestroy(): void;
    open(): void;
    close(): void;
    clearMessages(): void;
    protected onToggle(): void;
    protected onSuggestionSelect(item: ZChatSuggestion): void;
    protected onClickAttach(): void;
    protected onFileChange(event: Event): void;
    protected onTextareaPaste(event: ClipboardEvent): void;
    protected removeAttachment(id: string): void;
    protected formatFileSize(size: number): string;
    protected isImageAttachment(file: ZChatAttachment): boolean;
    protected openImagePreview(file: ZChatAttachment): void;
    protected closeImagePreview(): void;
    protected onInputKeydown(event: KeyboardEvent): void;
    protected onTextareaInput(event: Event): void;
    protected onSendMessage(): void;
    private _toggle;
    private _createMessage;
    private _simulateReply;
    private _buildMockReply;
    private _triggerRipple;
    protected onMessagesScrollbarInit(): void;
    protected onEscapeKey(): void;
    private _scheduleScrollToBottom;
    private _ensureBottomVisible;
    private _scrollToBottom;
    private _focusInputSoon;
    private _releaseAttachmentUrls;
    private _appendFiles;
    private _createMessagePreviewUrl;
    private _resolveOffsetValue;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZChatComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZChatComponent, "z-chat", ["zChat"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zOpen": { "alias": "zOpen"; "required": false; "isSignal": true; }; "zMessages": { "alias": "zMessages"; "required": false; "isSignal": true; }; "zTitle": { "alias": "zTitle"; "required": false; "isSignal": true; }; "zSubtitle": { "alias": "zSubtitle"; "required": false; "isSignal": true; }; "zPlaceholder": { "alias": "zPlaceholder"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zOffset": { "alias": "zOffset"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zSuggestions": { "alias": "zSuggestions"; "required": false; "isSignal": true; }; "zShowSuggestions": { "alias": "zShowSuggestions"; "required": false; "isSignal": true; }; "zShowPulse": { "alias": "zShowPulse"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zAllowAttachments": { "alias": "zAllowAttachments"; "required": false; "isSignal": true; }; "zAcceptedFiles": { "alias": "zAcceptedFiles"; "required": false; "isSignal": true; }; "zAutoReply": { "alias": "zAutoReply"; "required": false; "isSignal": true; }; "zAutoReplyDelay": { "alias": "zAutoReplyDelay"; "required": false; "isSignal": true; }; "zFabIcon": { "alias": "zFabIcon"; "required": false; "isSignal": true; }; "zBotIcon": { "alias": "zBotIcon"; "required": false; "isSignal": true; }; "zSendIcon": { "alias": "zSendIcon"; "required": false; "isSignal": true; }; }, { "zOpen": "zOpenChange"; "zMessages": "zMessagesChange"; "zSend": "zSend"; "zResponse": "zResponse"; "zToggle": "zToggle"; "zClear": "zClear"; }, never, never, true, never>;
}

declare const zChatWrapperVariants: (props?: ({
    zPosition?: "bottom-right" | "bottom-left" | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
declare const zChatPanelVariants: (props?: ({
    zPosition?: "bottom-right" | "bottom-left" | null | undefined;
    zSize?: "sm" | "default" | "lg" | null | undefined;
    zOpen?: boolean | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
declare const zChatFabVariants: (props?: ({
    zOpen?: boolean | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
type ZChatVariants = VariantProps<typeof zChatPanelVariants>;

export { ZChatComponent, zChatFabVariants, zChatPanelVariants, zChatWrapperVariants };
export type { ZChatAttachment, ZChatMessage, ZChatOffset, ZChatPosition, ZChatRole, ZChatSendEvent, ZChatSize, ZChatSuggestion, ZChatVariants };
