import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Microphone, Paperclip, Sliders } from '@gravity-ui/icons';
import { Icon } from '@gravity-ui/uikit';
import { block } from "../../../utils/cn.js";
import { ActionButton } from "../../atoms/ActionButton/index.js";
import { SubmitButton } from "../../atoms/SubmitButton/index.js";
import { ButtonGroup } from "../ButtonGroup/index.js";
import { i18n } from "./i18n/index.js";
import "./PromptInputFooter.css";
const b = block('prompt-input-footer');
/**
 * PromptInputFooter component displays the footer section with action icons
 * and submit button
 *
 * @param props - Component props
 * @returns React component
 */
export function PromptInputFooter(props) {
    const { submitButton, showSettings = false, onSettingsClick, showAttachment = false, onAttachmentClick, attachmentContent, showMicrophone = false, onMicrophoneClick, children, className, buttonSize = 'm', qa, } = props;
    // Render custom content with submit button
    if (children) {
        return (_jsxs("div", { className: b(null, className), "data-qa": qa, children: [_jsx("div", { className: b('content'), children: children }), _jsx("div", { className: b('submit'), children: _jsx(SubmitButton, Object.assign({}, submitButton, { size: buttonSize })) })] }));
    }
    const renderAttachment = () => {
        if (attachmentContent)
            return attachmentContent;
        if (!showAttachment)
            return null;
        return (_jsx(ActionButton, { view: "flat", size: buttonSize, onClick: onAttachmentClick, className: b('action-button'), tooltipTitle: i18n('tooltip-attachment'), children: _jsx(Icon, { data: Paperclip, size: 16 }) }));
    };
    // Render default footer
    return (_jsxs("div", { className: b(null, className), "data-qa": qa, children: [_jsx(ButtonGroup, { children: showSettings && (_jsx(ActionButton, { view: "flat", size: buttonSize, onClick: onSettingsClick, className: b('action-button'), tooltipTitle: i18n('tooltip-settings'), children: _jsx(Icon, { data: Sliders, size: 16 }) })) }), _jsxs(ButtonGroup, { children: [renderAttachment(), showMicrophone && (_jsx(ActionButton, { view: "flat", size: buttonSize, onClick: onMicrophoneClick, className: b('action-button'), tooltipTitle: i18n('tooltip-microphone'), children: _jsx(Icon, { data: Microphone, size: 16 }) })), _jsx(SubmitButton, Object.assign({}, submitButton, { size: buttonSize }))] })] }));
}
//# sourceMappingURL=PromptInputFooter.js.map
