import React from 'react'
import { VmpSeverError } from 'components/Empty'

// type ContextProviderProps = { children: React.ReactNode }
type ValidateEmptyProps = {
  children: React.ReactNode
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  data: any
  loading: boolean
}

const ValidateEmpty: React.FC<ValidateEmptyProps> = props => {
  return !props.loading && !props.data ? <VmpSeverError /> : <>{props.children}</>
}

export default ValidateEmpty
