"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UploadSection = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const rebass_1 = require("rebass");
const index_1 = tslib_1.__importDefault(require("../../../../../components/Radio/index"));
const index_2 = require("../../../../../components/Tabs/index");
const UploadFileSection_1 = require("./UploadFileSection");
const UploadTextSection_1 = require("./UploadTextSection");
const UploadSection = (props) => {
    return (react_1.default.createElement(rebass_1.Flex, { p: 2, height: "100%", flexDirection: "column" },
        react_1.default.createElement(index_2.Tabs, { mb: 2 },
            react_1.default.createElement(index_2.Tabs.Tab, null, "Import Type"),
            react_1.default.createElement(index_2.Tabs.Content, null,
                react_1.default.createElement(rebass_1.Flex, { flexDirection: "column" },
                    react_1.default.createElement(index_1.default, { onClick: () => props.onImportTypeChange('file'), checked: props.importType === 'file' }, "File"),
                    react_1.default.createElement(index_1.default, { onClick: () => props.onImportTypeChange('text'), checked: props.importType === 'text' }, "Text")))),
        react_1.default.createElement(index_2.Tabs, { flex: 1 },
            react_1.default.createElement(index_2.Tabs.Tab, null, props.importType === 'file' ? 'File Upload' : 'Text'),
            react_1.default.createElement(index_2.Tabs.Content, null, props.importType === 'file' ? (react_1.default.createElement(UploadFileSection_1.ImportFileSection, { readFile: props.readFile, supportedFileFormats: props.supportedFileFormats, message: props.fileMessage })) : (react_1.default.createElement(UploadTextSection_1.ImportTextSection, { message: props.textMessage, text: props.text, onTextChange: props.onTextChange }))))));
};
exports.UploadSection = UploadSection;
