import{a7 as a}from"./app-BgLa5dit.js";import{F as l}from"./EZim8aq-.chunk.js";function h(e){return Object.keys(e).reduce((r,s)=>(r[`${l.FILTER_PARAM_PREFIX}${s}`]=e[s],r),{})}const p={searchOrganisation(e){return`/ajax/system/organisations/search/instant?query=${e}`},searchCustomer(e){return`/ajax/system/customers/search?query=${e}`},searchContent({query:e,indices:r,success:s,filters:n,error:c}){return{url:a.urlBuilder("/api/search/v1/search/content",{query:e,index:r,...h(n)}),key:`search:${e}:index:${r}:filters:${JSON.stringify(n)}`,formatData:u=>{const i=u.results.map(o=>{const t={...o};return"subjectPresentationAudiences"in t&&delete t.subjectPresentationAudiences,t});return{...u,results:i}},success:s,error:c}},searchTags(e,r){return a.urlBuilder("/api/search/v1/search/tag",{query:e,"filters.tagType":r,index:"tag",searchAllTags:!0})},searchContentPartners(e,r){return{url:a.urlBuilder("/ajax/partner-profiles/search",{searchQuery:e,query:"_logo,_colour",onlySpotlight:r}),key:`search-content-partners:${e}:${r}`}}};export{p as S};
//# sourceMappingURL=BSa28HTr.chunk.js.map
