import { TransitionState } from '@wix/bex-core';
import { Box, Text } from '@wix/design-system';
import React, { useEffect, useState } from 'react';
import { observer } from 'mobx-react-lite';
// import { Collapse } from '../Collapse';
import { reaction } from 'mobx';
import { LinearAbsoluteProgressBar } from './LinearAbsoluteProgressBar';
function _ExportStepProgress({ state, }) {
    const { counter, totalForExport, absoluteCounter, translate: t } = state;
    const [collapse] = useState(() => new TransitionState());
    useEffect(() => {
        const disposers = [
            reaction(() => state.iterationsCountPoll.pollCount > 7, (show) => {
                collapse.setShow(show);
            }),
        ];
        return () => {
            disposers.forEach((d) => d());
        };
    }, []);
    return (React.createElement(Box, { gap: "SP1", direction: "vertical", width: "100%" },
        React.createElement(LinearAbsoluteProgressBar, { value: counter, count: absoluteCounter, total: totalForExport, dataHook: "export-linear-progress-bar" }),
        React.createElement(Text, { widows: true }, t('cairo.export.exportingDescription'))));
}
export const ExportStepProgress = observer(_ExportStepProgress);
//# sourceMappingURL=ExportStepProgress.js.map