import { Cookies } from 'react-cookie'; import { SelectedChannel } from '@jetshop/core/components/ChannelContext/ChannelContext'; import { Channel } from '@jetshop/core/types'; export interface QueryObject { culture?: string; currency?: string; channelCountry?: string; channel?: string; redirectDisabled?: boolean; articlenumber?: string; } export declare const getGroupedChannels: (availableChannels: Channel[], { groupName }: { groupName: string; }) => Channel[]; export declare const getURLBasename: (url: URL) => string; export declare const getURLLanguageBasename: ({ url, singleDomainMode }: { url: URL; singleDomainMode: boolean; }) => string; /** * Returns the default channel from a list of channels * @param channels List of channels to search through */ export declare const getDefaultChannel: (channels: Channel[]) => Channel; /** * Converts a Channel object to a SelectedChannel with the specified culture and currency * @param channel Channel to convert * @param culture Desired culture * @param currency Desired currency * @param country? Optional desired country code */ export declare const createSelectedChannel: (channel: Channel, culture?: string, currency?: string, country?: string, urlBasenameLanguage?: string) => SelectedChannel; /** * Returns a channel with the specified name * @param channelName Name of the channel to be fond * @param channels Array of channels to search through */ export declare const findChannel: (channelName: string, channels: Channel[]) => Channel; export declare const findChannelById: (id: number, channels: Channel[]) => Channel; export declare const findChannelByCountry: (countryCode: string, channels: Channel[]) => Channel; export declare const getQueryObject: (url: string) => QueryObject; export declare const setChannelCookies: ({ culture, currency, channelCountry, channel, redirectDisabled }: QueryObject, cookies: Cookies) => void; export declare function getLanguageFromCulture(culture: string): string; export declare function getChannelBasename(selectedChannel: SelectedChannel): string; export declare function isInDev(url: string): boolean; export declare function getSelectedAndRecommendedChannel({ url, singleDomainMode, channels, cookies, geoipCountry, acceptedLanguages, disableGeoRedirect }: { url: string; singleDomainMode: boolean; channels: Channel[]; cookies: Cookies; geoipCountry?: string; acceptedLanguages?: string | string[]; disableGeoRedirect?: boolean; }): { redirect: boolean; selectedChannel: SelectedChannel; recommendedChannel: SelectedChannel; channels: Channel[]; group: Channel[]; }; export declare function getChannelHeaders(channel?: SelectedChannel): { currency: string; channelid: number; culture: string; country: string; name: string; } | { currency?: undefined; channelid?: undefined; culture?: undefined; country?: undefined; name?: undefined; };