import { usePageUrlState } from '../../../../util/url_state' ; import { ML_PAGES } from '../../../../../../common/constants/locator' ; import { ExplorationPageUrlState } from '../../../../../../common/types/locator' ; import { SEARCH_QUERY_LANGUAGE } from '../../../../../../common/constants/search' ; import { isPopulatedObject } from '../../../../../../common/util/object_utils' ; export function getDefaultExplorationPageUrlState ( overrides ? ) { return { queryText : '' , queryLanguage : SEARCH_QUERY_LANGUAGE . KUERY , pageIndex : 0 , pageSize : 25 , analysis : false , evaluation : true , feature_importance : true , results : true , splom : true , ... ( isPopulatedObject ( overrides ) ? overrides : { } ) , } ; } export function useExplorationUrlState ( overrides ? ) { return usePageUrlState < ExplorationPageUrlState > ( ML_PAGES . DATA_FRAME_ANALYTICS_EXPLORATION , getDefaultExplorationPageUrlState ( overrides ) ) ; }