import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { FormPageFooterContainer } from '../../FormPageFooterContainer';
import { useFormFooter } from './hooks';
import { SecondaryActions } from './SecondaryActions';
import { ActionsWrapper, ShowMoreButton, StyledFormSubmitButton, } from './styles';
export const FormPageFooter = (props) => {
    const { isDisabled, submitButtonText = 'Отправить', secondaryActions, } = props;
    const { isActive, handleToggle, isShowMoreButton } = useFormFooter({
        secondaryActions,
    });
    return (_jsxs(FormPageFooterContainer, { children: [_jsxs(ActionsWrapper, { "$isShowMoreButton": isShowMoreButton, children: [_jsx(StyledFormSubmitButton, { size: "large", disabled: isDisabled, children: submitButtonText }), secondaryActions && (_jsx(SecondaryActions, { isDisabled: isDisabled, actions: secondaryActions, isActive: isActive }))] }), isShowMoreButton && (_jsxs(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"] }))] }));
};
