import { Stack } from '@mobily/stacks'; import React, { PropsWithChildren, useContext, useMemo } from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import UIRadioGroupControlMolecule from '../../UIRadioGroupControlMolecule'; import UISourceDisplayMolecule from '../../UISourceDisplayMolecule'; import UITTreeDisplayMolecule from '../../UITTreeDisplayMolecule'; import BoxNucleon from '../../nucleons/BoxNucleon'; import { demoStateContext } from './contexts'; import SheetRouteContainer from './SheetRouteContainer'; import { usePlaygroundSetter, usePlaygroundStateSlice } from './playgroundStore'; import { useColorPrimitives, useColorRoles } from '../../../theme/colorSystem'; import { PropsWithStyle } from '../../nucleons/types'; import TextRoleNucleon from '../../nucleons/TextRoleNucleon'; function SourceSectionTitle({ title, style }: PropsWithStyle<{ title: string }>) { const { surface } = useColorRoles(); return ( {title} ); } function SourceRouteSection({ children, title, style }: PropsWithChildren<{ style?: StyleProp; title: string; }>) { return ( {children} ); } function SourceBoxAtom({ children, padding, style }: PropsWithChildren<{ style?: StyleProp; padding?: number }>) { const { surface: background } = useColorPrimitives(); return ( {children} ); } function HtmlDisplayBox({ html, style }: { html: string; style?: any }) { return ( ); } export default function SheetSourceRoute() { const ttree = useContext(demoStateContext).ttree; const html = useContext(demoStateContext).html; const sourceMap = usePlaygroundStateSlice('sourceMap'); const selectedSource = usePlaygroundStateSlice('selectedSource'); const setSelectedSource = usePlaygroundSetter('selectedSource'); const items = useMemo( () => Object.keys(sourceMap).map((key) => ({ label: sourceMap[key].label, value: key })), [sourceMap] ); return ( ); }