import { FunctionComponent } from 'preact';
import { HorizontalSeparator } from '@/components/shared/HorizontalSeparator';
const HorizontalLine: FunctionComponent<{ index: number; length: number }> = ({
index,
length,
}) => (index < length - 1 ? : null);
export const PreferencesSegment: FunctionComponent = ({ children }) => (
{children}
);
export const PreferencesGroup: FunctionComponent = ({ children }) => (
{Array.isArray(children)
? children
.filter(
(child) => child != undefined && child !== '' && child !== false
)
.map((child, i, arr) => (
<>
{child}
>
))
: children}
);
export const PreferencesPane: FunctionComponent = ({ children }) => (
{children != undefined && Array.isArray(children)
? children.map((child, idx, arr) => (
<>
{child}
{idx < arr.length - 1 ?
: undefined}
>
))
: children}
);