import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { dashboardLayoutMainClassnames } from './constants';
import { AlertWrapper, MainRoot } from './styles';
import { useLogic } from './useLogic';
/**
 * Основной контент приложения
 */
export const Main = forwardRef(({ children, alert }, ref) => {
    const { onAnimationEnd, alertContainerRef } = useLogic();
    return (_jsxs(_Fragment, { children: [_jsx(AlertWrapper, { ref: alertContainerRef, className: dashboardLayoutMainClassnames.alert, children: alert }), _jsx(MainRoot, { className: dashboardLayoutMainClassnames.main, ref: ref, onAnimationEnd: onAnimationEnd, children: children })] }));
});
