export const apiUrls = { BASE_URL: (origin: string) => typeof window !== 'undefined' ? '/homedepotcacommercewebservices/v2/homedepotca' : `${origin}/homedepotcacommercewebservices/v2/homedepotca`, GET_NAV_NODES: () => '/catalogs/homedepotcaContentCatalog/navigation.json', GET_LOCALIZE: (userId, pageSize: string, currentPage: string, query: string, latitude: number, longitude: number) => { let result = `/users/${userId}/localize?`; if (typeof pageSize !== 'undefined') { result += `pageSize=${pageSize}`; } if (typeof currentPage !== 'undefined') { result += `¤tPage=${currentPage}`; } if (query) { result += `&query=${query}`; } if (latitude) { result += `&latitude=${latitude}`; } if (longitude) { result += `&longitude=${longitude}`; } return result; }, BASE_URL_HOMEDEPOT_CA: (origin: string, lang: string) => typeof window !== 'undefined' ? `/content/homedepot_ca/${lang}_ca` : `${origin}/content/homedepot_ca/${lang}_ca`, GET_COMMERCE_STORE_LIST: (pageSize: string, currentPage: string, query: string, latitude: number, longitude: number) => { let result = '/.commerce.store.json?'; if (typeof pageSize !== 'undefined') { result += `pageSize=${pageSize}`; } if (typeof currentPage !== 'undefined') { result += `¤tPage=${currentPage}`; } if (query) { result += `&query=${query}`; } if (latitude) { result += `&latitude=${latitude}`; } if (longitude) { result += `&longitude=${longitude}`; } return result; }, GET_COMMERCE_STORE: (query: string) => `/.commerce.store.json?query=${query}`, BASE_ACCOUNT_URL: (origin: string) => typeof window !== 'undefined' ? '/content/homedepot_ca' : `${origin}/content/homedepot_ca`, ACCOUNT_LOGIN: (lang: string) => `/${lang}_ca/.commerce.login.json`, ACCOUNT_LOGOUT: (lang: string) => `/${lang}_ca/.commerce.logout.json`, GET_SEARCH_TOP_RESULTS: (catalogVersion: string, query: string, localizedPOS: string) => `/search/searchTopResults?catalogVersion=${catalogVersion}&query=${query}&localizedPOS=${localizedPOS}`, GET_SEARCH_KEYWORD_SUGGESTIONS: (catalogVersion: string, query: string) => `/search/searchKeywordSuggestions?catalogVersion=${catalogVersion}&query=${query}`, GET_STORE_INFORMATION: (storeId: string) => `/stores/${storeId}`, GET_SKU: (searchTerm: string, localizedPOS: string) => `/search/sku?q=${searchTerm}&storeId=${localizedPOS}` };