import { __assign } from '../../../node_modules/tslib/tslib.es6.js';
import React, { useCallback } from 'react';
import { useI18n } from '@smg-automotive/i18n-pkg';
import { TenantSelectionModalLayout } from '../ModalLayout.js';
import { TenantSelectionSelectList } from './List.js';

var TenantSelectionSelect = function (_a) {
    var tenantSelection = _a.tenantSelection, setTenantSelection = _a.setTenantSelection, user = _a.user;
    var t = useI18n().t;
    var onTenantSelect = useCallback(function (selectedTenantId) {
        setTenantSelection(function (current) {
            return __assign(__assign({}, current), { selectedTenant: selectedTenantId, showSelection: false });
        });
    }, [setTenantSelection]);
    return (React.createElement(TenantSelectionModalLayout, null,
        React.createElement(TenantSelectionSelectList, { title: t('auth.tenantSelection.selectionTitle'), managedSellers: user.managedSellers, selectedTenantId: tenantSelection.selectedTenant, onTenantSelect: onTenantSelect })));
};

export { TenantSelectionSelect };
//# sourceMappingURL=index.js.map
