import React__default from 'react';
import { extractErrorMessage } from '../../utils/extractErrorMessage.mjs';
import { Alert } from '../components/Alert.mjs';
import { FlexBox } from '../shared/components/FlexBox.mjs';
import { PageLoadingIndicator } from '../components/PageLoadingIndicator.mjs';
import { Typography } from '../components/Typography.mjs';
import { useOrgInfo } from '../utils/useOrgInfo.mjs';
import { OrgSettingsAuthenticationSettingsSection } from './OrgSettingsAuthenticationSettingsSection.mjs';
import { OrgSettingsDetailsSection } from './OrgSettingsDetailsSection.mjs';
import { OrgSettingsRoleAssignmentsSection } from './OrgSettingsRoleAssignmentsSection.mjs';
import { OrgSettingsUserOnboardingSection } from './OrgSettingsUserOnboardingSection.mjs';

const OrgSettingsScreen = ()=>{
    const { isLoading, error, data: orgInfo } = useOrgInfo();
    if (isLoading) {
        return /*#__PURE__*/ React__default.createElement(PageLoadingIndicator, null);
    }
    if (error) {
        return /*#__PURE__*/ React__default.createElement(Alert, null, extractErrorMessage(error));
    }
    return /*#__PURE__*/ React__default.createElement(FlexBox, {
        flexDirection: "column",
        gap: 3
    }, /*#__PURE__*/ React__default.createElement(Typography, {
        variant: "h1"
    }, "Authentication & Access Settings"), orgInfo && /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, /*#__PURE__*/ React__default.createElement(OrgSettingsDetailsSection, {
        orgInfo: orgInfo
    }), /*#__PURE__*/ React__default.createElement(OrgSettingsAuthenticationSettingsSection, {
        orgInfo: orgInfo
    }), /*#__PURE__*/ React__default.createElement(OrgSettingsUserOnboardingSection, {
        orgInfo: orgInfo
    }), /*#__PURE__*/ React__default.createElement(OrgSettingsRoleAssignmentsSection, {
        orgInfo: orgInfo
    })));
};

export { OrgSettingsScreen };
//# sourceMappingURL=OrgSettingsScreen.mjs.map
