import * as React from 'react';
import { Box } from 'rebass';
import { Tabs } from '../../../../components/Tabs';
import FormLayout, { FormRow } from '../../../../components/FormLayout';
import DropdownButton from '../../../../components/DropdownButton';
export const ScheduleSettingsOpenFin = (props) => {
    const reportOptions = props.allReports.map((report) => ({
        label: report.Name,
        value: report.Name,
        onClick: () => props.onChange({
            ...props.openFin,
            OpenFinReport: {
                ...props.openFin.OpenFinReport,
                ReportName: report.Name,
            },
        }),
    }));
    return (React.createElement(Box, { "data-name": "schedule-settings-openfin" },
        React.createElement(Tabs, { autoFocus: false },
            React.createElement(Tabs.Tab, null, "OpenFin Schedule Settings"),
            React.createElement(Tabs.Content, null,
                React.createElement(FormLayout, null,
                    React.createElement(FormRow, { label: "Select Report" },
                        React.createElement(DropdownButton, { "data-name": "select-report", columns: ['label'], style: { width: 300 }, disabled: props.allReports.length == 0, items: reportOptions }, props?.openFin?.OpenFinReport?.ReportName || 'Select Report')))))));
};
