import {
Box,
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
Button,
Flex,
Heading,
Spacer,
Stack,
Text
} from '@chakra-ui/react'
import {ChevronRightIcon} from '@chakra-ui/icons'
import {Link} from 'react-router-dom'
import {IViewConnection} from '../context'
import {DividerWithText} from '../../../../../ui/components/AdminLogin/DividerWithText'
const Breadcrums = () => {
const path = (
typeof window !== 'undefined' ? window.location.hash : ''
).replace('#', '')
const paths = path.split('/').filter(Boolean)
return (
}>
{paths.map((name, index) => {
// capitalize first letter
const label = name.charAt(0).toUpperCase() + name.slice(1)
const itemPath = `/${paths.slice(0, index + 1).join('/')}`
return (
{index === 0 ? (
{label}
) : (
{label}
)}
)
})}
)
}
export const BaseView = (props: {
title: string
description: string
controls?: React.ReactNode[]
children: React.ReactNode
}) => {
return (
{props.title}
{props.controls && (
<>
{props.controls.map(control => (
<>{control}>
))}
>
)}
{props.description}
{props.children}
)
}
export const withBaseView = (Component: IViewConnection) => {
return (props: any) => {
return (
)
}
}