"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormPageFooter = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const FormPageFooterContainer_1 = require("../../FormPageFooterContainer");
const hooks_1 = require("./hooks");
const SecondaryActions_1 = require("./SecondaryActions");
const styles_1 = require("./styles");
const FormPageFooter = (props) => {
    const { isDisabled, submitButtonText = 'Отправить', secondaryActions, } = props;
    const { isActive, handleToggle, isShowMoreButton } = (0, hooks_1.useFormFooter)({
        secondaryActions,
    });
    return ((0, jsx_runtime_1.jsxs)(FormPageFooterContainer_1.FormPageFooterContainer, { children: [(0, jsx_runtime_1.jsxs)(styles_1.ActionsWrapper, { "$isShowMoreButton": isShowMoreButton, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledFormSubmitButton, { size: "large", disabled: isDisabled, children: submitButtonText }), secondaryActions && ((0, jsx_runtime_1.jsx)(SecondaryActions_1.SecondaryActions, { isDisabled: isDisabled, actions: secondaryActions, isActive: isActive }))] }), isShowMoreButton && ((0, jsx_runtime_1.jsxs)(styles_1.ShowMoreButton, { disabled: isDisabled, variant: "text", onClick: handleToggle, "$isActive": isActive, children: [isActive ? 'Скрыть' : 'Показать', " \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F"] }))] }));
};
exports.FormPageFooter = FormPageFooter;
