"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatInputButton = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const button_1 = require("../button");
const core_1 = require("../core");
const chat_types_1 = require("./chat.types");
/**
 *  Displays a chat input button.
 */
exports.ChatInputButton = (0, core_1.vui)((props, ref) => {
    const styles = (0, core_1.useStyleConfig)('Chat', props);
    const { status = 'default', onSend, onStop } = props;
    const icon = status === chat_types_1.ChatInputStatus.Processing && onStop ? 'falStopCircle' : 'falChevronCircleRight';
    return ((0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: status === chat_types_1.ChatInputStatus.Disabled || (status === chat_types_1.ChatInputStatus.Processing && !onStop), h: "100%", icon: icon, ml: 1, onClick: () => (status === chat_types_1.ChatInputStatus.Processing ? onStop === null || onStop === void 0 ? void 0 : onStop() : onSend === null || onSend === void 0 ? void 0 : onSend()), ref: ref, variant: "tertiaryDark" }, styles === null || styles === void 0 ? void 0 : styles.inputButton)));
});
exports.ChatInputButton.displayName = 'ChatInputButton';
exports.default = exports.ChatInputButton;
//# sourceMappingURL=chatInputButton.js.map