import React from 'react';
import { useSelector } from 'react-redux';
import { ReportNameSelector } from './ReportNameSelector';
import { ReportFormatSelector } from './ReportFormatSelector';
import { ExportDestinationPicker } from './ExportDestinationPicker';
import { useAdaptable } from '../AdaptableContext';
import { Flex } from '../../components/Flex';
export const ExportStatusBar = () => {
    const adaptable = useAdaptable();
    const exportApi = adaptable.api.exportApi;
    const currentReportName = useSelector((state) => state.Export.CurrentReport);
    const currentFormat = useSelector((state) => state.Export.CurrentFormat);
    return (React.createElement(React.Fragment, null,
        React.createElement(Flex, { className: "twa:gap-1" },
            React.createElement(ReportNameSelector, { viewType: "StatusBar", reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
            React.createElement(ReportFormatSelector, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) })),
        React.createElement(ExportDestinationPicker, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat })));
};
