import React from 'react';
import { useTranslation } from 'react-i18next';
import { SideSheet } from '../../../../UI';
import { Field } from '../../../../utilities/form';
import { FluentTextField } from '../../../../UI/inputs/textField';
import { LayoutUnit } from '../../../../layout';
import { FormControlLabel, Switch } from '@material-ui/core';
const UdpTransactionTypePageConfigurationSidesheet = (props) => {
    var _a, _b, _c, _d, _e;
    const { initialData, isSidesheetOpen, setIsSidesheetOpen } = props;
    const { t } = useTranslation();
    return (React.createElement(SideSheet, { open: isSidesheetOpen, width: 600, title: t('Page Configurations'), onClose: () => setIsSidesheetOpen(false) }, React.createElement(React.Fragment, null, React.createElement(Field, { component: FluentTextField, label: t("Grid Title"), id: "gridTitle", name: "gridTitle", fullWidth: true, variant: "outlined", margin: "normal", size: "small", initialValue: ((_a = initialData === null || initialData === void 0 ? void 0 : initialData.pageConfiguration) === null || _a === void 0 ? void 0 : _a.gridTitle) || '' }), React.createElement(Field, { component: FluentTextField, label: t("Create Transaction Button Label"), id: "createTransactionButtonLabel", name: "createTransactionButtonLabel", fullWidth: true, variant: "outlined", margin: "normal", size: "small", initialValue: ((_b = initialData === null || initialData === void 0 ? void 0 : initialData.pageConfiguration) === null || _b === void 0 ? void 0 : _b.createTransactionButtonLabel) || '' }), React.createElement(LayoutUnit, { unit: "nudge" }), React.createElement(FormControlLabel, { control: (React.createElement(Field, { component: Switch, id: "hideCreateTransaction", name: "hideCreateTransaction", type: "checkbox", initialValue: !!((_c = initialData === null || initialData === void 0 ? void 0 : initialData.pageConfiguration) === null || _c === void 0 ? void 0 : _c.hideCreateTransaction) })), label: t("Hide Create Transaction Button") }), React.createElement(LayoutUnit, { unit: "nudge" }), React.createElement(FormControlLabel, { control: (React.createElement(Field, { component: Switch, id: "paginationAutoPageSize", name: "paginationAutoPageSize", type: "checkbox", initialValue: initialData ? (_d = initialData === null || initialData === void 0 ? void 0 : initialData.pageConfiguration) === null || _d === void 0 ? void 0 : _d.paginationAutoPageSize : true })), label: t("Pagination Auto PageSize") }), React.createElement(LayoutUnit, { unit: "nudge" }), React.createElement(FormControlLabel, { control: (React.createElement(Field, { component: Switch, id: "hideSaveChanges", name: "hideSaveChanges", type: "checkbox", initialValue: !!((_e = initialData === null || initialData === void 0 ? void 0 : initialData.pageConfiguration) === null || _e === void 0 ? void 0 : _e.hideSaveChanges) })), label: t("Hide Save Changes Button") }))));
};
export default UdpTransactionTypePageConfigurationSidesheet;
//# sourceMappingURL=UdpTransactionTypePageConfigurationSidesheet.js.map