import { Alert } from '@tidbcloud/uikit'
import { IconAlertTriangle } from '@tidbcloud/uikit/icons'

import { useSharedTiDBContext } from 'dbaas/screens/NextGen/tidb-mgmt-container/shared/tidb-context'

export const TidbCreatingAlertMessage = () => {
  const tidb = useSharedTiDBContext()

  return (
    (tidb?.computed.creating || tidb?.computed.restoring) && (
      <Alert color="yellow" icon={<IconAlertTriangle />} py={10}>
        Instance creation is in progress. Features will be enabled upon completion of the process.
      </Alert>
    )
  )
}
