import { IOptions } from './interfaces' ; import { getTimeParams } from '@kobsio/plugin-core' ; export const getInitialOptions = ( search , isInitial ) : IOptions => { const params = new URLSearchParams ( search ) ; const scope = params . get ( 'scope' ) ; return { scope : scope ? scope : 'All' , times : getTimeParams ( params , isInitial , 'last30Days' ) , } ; } ;