import queryString , { ParsedQuery } from 'query-string' ; import { getAppSearchUrl } from '../../../shared/enterprise_search_url' ; import { EngineLogic } from '../engine' ; export const generatePreviewUrl = ( query ) => { const { engineName } = EngineLogic . values ; return queryString . stringifyUrl ( { query , url : getAppSearchUrl ( `/engines/${ engineName }/search_experience/preview` ) , } , { arrayFormat : 'bracket' , skipEmptyString : true } ) ; } ;