import { ComputedRef, MaybeRefOrGetter } from 'vue'; import { IMessage } from '@cognigy/socket-client'; import { ChatConfig, IWebchatChannelPayload } from '../types'; export interface UseChannelPayloadReturn { /** * The resolved channel payload (_webchat, _defaultPreview, or _facebook) */ payload: ComputedRef; /** * Whether the message has any channel payload */ hasPayload: ComputedRef; /** * The message content from the payload */ message: ComputedRef; /** * Quick check for quick replies */ hasQuickReplies: ComputedRef; /** * Quick check for attachment */ hasAttachment: ComputedRef; /** * The attachment type if present */ attachmentType: ComputedRef; } /** * Reactive composable for accessing channel-specific payload from a message * * @param message - The message (can be ref, getter, or plain value) * @param config - Optional chat config (can be ref, getter, or plain value) * @returns Reactive payload accessors * * @example * ```ts * const { payload, hasQuickReplies, attachmentType } = useChannelPayload(message, config) * * // In template or computed * if (hasQuickReplies.value) { * // Render quick reply buttons * } * ``` */ export declare function useChannelPayload(message: MaybeRefOrGetter, config?: MaybeRefOrGetter): UseChannelPayloadReturn;