import { AllocateAction , MigrateAction } from '../../../../common/types' ; export const determineDataTierAllocationType = ( actions = { } ) => { const { allocate , migrate } = actions ; if ( migrate ?. enabled === false ) { return 'none' ; } if ( ! allocate ) { return 'node_roles' ; } if ( ( allocate . require && Object . keys ( allocate . require ) . length ) || ( allocate . include && Object . keys ( allocate . include ) . length ) || ( allocate . exclude && Object . keys ( allocate . exclude ) . length ) ) { return 'node_attrs' ; } return 'node_roles' ; } ;