import { getEnvs } from "../environment/env"; interface ClientConfig { domainType: string; domainState: number; clientScope: string; favIconUrl: string; logoUrl: string; logoWidth?: any; logoHeight?: any; properties: Properties; domainProducts: DomainProduct[]; } interface DomainProduct { id: number; masterHotelId?: any; name: string; address: string; destinationCountry: string; destinationCity: string; destinationDistrict: string; destinationCountryId: number; destinationCityId: number; destinationDistrictId: number; email: string; phone: string; } interface Properties { fontFamily: string; borderRadius: string; color: string; fontSize: string; fontStyle: string; fontWeight: string; lineHeight: string; textDecorationLine: string; linkcolor: string; linktype: string; } export const clientConfigurationService = async ( baseUrl: string, token: string, ) => { const envs = getEnvs(baseUrl); const url = `${envs.wlDisplayUrl}/api/clientconfiguration/get`; try { const response = await fetch(url, { method: "GET", headers: { Authorization: `Bearer ${token}` }, }); const responseJson = await response.json(); return responseJson.result as ClientConfig; } catch (error) { return null; } };