@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
80 lines (79 loc) • 4.54 kB
TypeScript
import type { ChatStatus } from 'ai';
import type { AppConfig } from '@nuxt/schema';
import theme from '#build/b24ui/chat-prompt-submit';
import type { ButtonProps, ButtonSlots, IconComponent, LinkPropsKeys } from '../types';
import type { ComponentConfig } from '../types/tv';
type ChatPromptSubmit = ComponentConfig<typeof theme, AppConfig, 'chatPromptSubmit'>;
export interface ChatPromptSubmitProps extends Omit<ButtonProps, LinkPropsKeys | 'icon' | 'color'> {
status?: ChatStatus;
/**
* The icon displayed in the button when the status is `ready`.
* @defaultValue icons.imSend
* @IconComponent
*/
icon?: IconComponent;
/**
* The color of the button when the status is `ready`.
* @defaultValue 'air-primary'
*/
color?: ButtonProps['color'];
/**
* The icon displayed in the button when the status is `streaming`.
* @defaultValue icons.stop
* @IconComponent
*/
streamingIcon?: IconComponent;
/**
* The color of the button when the status is `streaming`.
* @defaultValue 'air-secondary-accent-2'
*/
streamingColor?: ButtonProps['color'];
/**
* The icon displayed in the button when the status is `submitted`.
* @defaultValue icons.stop
* @IconComponent
*/
submittedIcon?: IconComponent;
/**
* The color of the button when the status is `submitted`.
* @defaultValue 'air-secondary-no-accent'
*/
submittedColor?: ButtonProps['color'];
/**
* The icon displayed in the button when the status is `error`.
* @defaultValue icons.reload
* @IconComponent
*/
errorIcon?: IconComponent;
/**
* The color of the button when the status is `error`.
* @defaultValue 'air-primary-alert'
*/
errorColor?: ButtonProps['color'];
b24ui?: ChatPromptSubmit['slots'] & ButtonProps['b24ui'];
class?: any;
}
export interface ChatPromptSubmitEmits {
stop: [event: MouseEvent];
reload: [event: MouseEvent];
}
declare const _default: typeof __VLS_export;
export default _default;
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChatPromptSubmitProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
stop: (event: MouseEvent) => any;
reload: (event: MouseEvent) => any;
}, string, import("vue").PublicProps, Readonly<ChatPromptSubmitProps> & Readonly<{
onStop?: ((event: MouseEvent) => any) | undefined;
onReload?: ((event: MouseEvent) => any) | undefined;
}>, {
color: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
status: ChatStatus;
streamingColor: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
submittedColor: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
errorColor: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};