export const transformNeighborhood = (locale, neighborhood, configuration) => {
    var _a;
    if (!neighborhood) {
        return undefined;
    }
    let neighborhoodName = locale === "en" ? neighborhood.name_en : neighborhood.name_fr;
    if ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.name) === null || _a === void 0 ? void 0 : _a.value) {
        neighborhoodName = configuration.name.value;
    }
    return {
        geogId: neighborhood.geog_id,
        level: neighborhood.level,
        name: neighborhoodName,
        countryCode: neighborhood.country_code,
        subCountryCode: neighborhood.sub_country_code,
        imageUrl: configuration === null || configuration === void 0 ? void 0 : configuration.image_url.value,
        summary: configuration === null || configuration === void 0 ? void 0 : configuration.summary.value,
    };
};
//# sourceMappingURL=transformNeighborhood.js.map