import React, { FC, ReactNode } from 'react' import { View, StyleSheet, ViewStyle } from 'react-native' import { useTheme } from '../../hooks' import { Button, Heading, Icon, TextButton, Text, type ButtonProps, type HeadingProps, type IconString, type IconStyle, type TextButtonProps, type TextProps, } from '../display' // ======================================== // ====== Exports ========================= // ======================================== const BlankState = { Root: BlankStateRoot, Imagery: BlankStateImagery, Content: BlankStateContent, Heading: BlankStateHeading, Text: BlankStateText, Button: BlankStateButton, TextButton: BlankStateTextButton, } as const type BlankStateComponents = { Root: FC Imagery: FC Content: FC Heading: FC Text: FC Button: FC TextButton: FC } export default BlankState as BlankStateComponents export type { BlankStateRootProps, BlankStateImageryProps, BlankStateContentProps, BlankStateHeadingProps, BlankStateTextProps, BlankStateButtonProps, BlankStateTextButtonProps, } // ======================================== // ====== BlankStateRoot ================== // ======================================== interface BlankStateRootProps { children: ReactNode style?: ViewStyle } function BlankStateRoot({ children, style }: BlankStateRootProps) { const styles = useStyles() return {children} } BlankStateRoot.displayName = 'BlankState.Root' // ======================================== // ====== BlankStateImagery =============== // ======================================== interface BlankStateImageryProps { name: IconString size?: number style?: IconStyle } function BlankStateImagery({ name, size = 32, style }: BlankStateImageryProps) { const styles = useStyles() /* NOTE: BlankState.Imagery will eventually return more then just an Icon component Eventually it will need to return SVG illustrations from the theme or internally for Services Mobile. This first step of using a more abstract component just allows us to keep this component open to change, without being overly perscriptive on how the change should be implomented. */ return } BlankStateImagery.displayName = 'BlankState.Imagery' // ======================================== // ====== BlankStateContent =============== // ======================================== interface BlankStateContentProps { children: ReactNode style?: ViewStyle } function BlankStateContent({ children, style }: BlankStateContentProps) { const styles = useStyles() return {children} } BlankStateContent.displayName = 'BlankState.Content' // ======================================== // ====== BlankStateHeading =============== // ======================================== interface BlankStateHeadingProps { children: ReactNode style?: HeadingProps['style'] } function BlankStateHeading({ children, style }: BlankStateHeadingProps) { const styles = useStyles() return ( {children} ) } BlankStateHeading.displayName = 'BlankState.Heading' // ======================================== // ====== BlankStateText ================== // ======================================== interface BlankStateTextProps { children: ReactNode style?: TextProps['style'] } function BlankStateText({ children, style }: BlankStateTextProps) { const styles = useStyles() return ( {children} ) } BlankStateText.displayName = 'BlankState.Text' // ======================================== // ====== BlankStateButton ================ // ======================================== interface BlankStateButtonProps extends ButtonProps {} function BlankStateButton(props: BlankStateButtonProps) { return