import { SharedCluster } from 'dbaas/features/ClusterManagement/cluster'
import { isClusterInvalid, TableFallback } from 'dbaas/screens/ClusterV2/components/PausedStatus'

export const renderDMListFallback = (cluster: SharedCluster) => {
  if (isClusterInvalid(cluster)) {
    return (
      <TableFallback>
        <TableFallback.Paused
          cluster={cluster}
          featureName="Data Migration"
          featureDesc="Migrate data from MySQL-compatible databases into TiDB Cloud with minimal downtime. This feature supports both full and incremental data migration to ensure your TiDB cluster stays up-to-date with real-time changes."
        />
      </TableFallback>
    )
  }

  return (
    <TableFallback>
      <TableFallback.Empty
        title="Get started by creating your first data migration"
        desc="Migrate data from MySQL-compatible databases into TiDB Cloud with minimal downtime. This feature supports both full and incremental data migration to ensure your TiDB cluster stays up-to-date with real-time changes."
      />
    </TableFallback>
  )
}
