import { Accordion, Box, Button, FieldGroup, Skeleton } from '@rocket.chat/fuselage';
import React from 'react';
import {
usePrivilegedSettingsSection,
usePrivilegedSettingsSectionChangedState,
} from '../../contexts/PrivilegedSettingsContext';
import { useTranslation } from '../../contexts/TranslationContext';
import { Setting } from './Setting';
export function Section({ children, groupId, hasReset = true, help, sectionName, solo }) {
const section = usePrivilegedSettingsSection(groupId, sectionName);
const changed = usePrivilegedSettingsSectionChangedState(groupId, sectionName);
const t = useTranslation();
const handleResetSectionClick = () => {
section.reset();
};
return
{help && {help}}
{section.settings.map((settingId) => )}
{hasReset && section.canReset && }
{children}
;
}
export function SectionSkeleton() {
return }>
{Array.from({ length: 10 }).map((_, i) => )}
;
}
Section.Skeleton = SectionSkeleton;