UNPKG

@servicetitan/assist-ui

Version:

ServiceTitan Atlas UI Components

53 lines (52 loc) 2.11 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import classNames from 'classnames'; import { observer } from 'mobx-react'; import { Link, Text } from '@servicetitan/anvil2'; import { ChatComposerRich } from '../chat-composer-rich'; import * as styles from './footer.module.less'; export const Footer = observer(({ isLoading = false, placeholder = 'Ask Atlas', message, onMessageChange, onSubmit, className, messageInputId, sendIconId, learnMoreLinkId, onUploadFile, onDictateMessage })=>{ const handleSubmit = ()=>{ if (!isLoading) { onSubmit(); } }; return /*#__PURE__*/ _jsxs("div", { className: classNames(styles.chatFooter, className), children: [ /*#__PURE__*/ _jsx(ChatComposerRich, { messageInputId: messageInputId, sendIconId: sendIconId, placeholder: placeholder, onSend: handleSubmit, onChange: onMessageChange, message: message, onUploadFile: onUploadFile, onDictateMessage: onDictateMessage }), /*#__PURE__*/ _jsxs(Text, { subdued: true, variant: "body", size: "small", className: "fs-label-small m-block-start-1", children: [ "Atlas is TI-powered, subject to our privacy policy.", ' ', /*#__PURE__*/ _jsx(Link, { id: learnMoreLinkId, target: "_blank", href: "#", appearance: "secondary", children: /*#__PURE__*/ _jsx(Text, { inline: true, size: "small", subdued: true, className: "fs-label-small", children: "Learn more" }) }) ] }) ] }); }); //# sourceMappingURL=footer.js.map