import { getTimeZones } from '@vvo/tzdb';
import _ from 'lodash';
const TIME_ZONE_CONTENT = getTimeZones();
const TIME_ZONE_HASH = TIME_ZONE_CONTENT.reduce((m, x) => {
    m[x.name] = _.omit(x, [
        'rawFormat',
        'currentTimeOffsetInMinutes',
        'currentTimeFormat',
    ]);
    return m;
}, {});
const TIME_ZONE_ABBREVIATION = _.uniq(TIME_ZONE_CONTENT.filter(x => x.abbreviation).map(x => x.abbreviation));
const TIME_ZONE_ABBREVIATION_HASH = TIME_ZONE_ABBREVIATION.reduce((m, x) => {
    const name = TIME_ZONE_CONTENT.filter(tz => tz.abbreviation === x).map(tz => tz.name);
    m[x] = { name };
    return m;
}, {});
const TIME_ZONE_LOCATION = _.uniq(TIME_ZONE_CONTENT.filter(x => x.name).map(x => x.name));
export const time_zone_abbreviation = {
    form: 'list',
    list: TIME_ZONE_ABBREVIATION,
};
export const time_zone_location = {
    form: 'list',
    list: TIME_ZONE_LOCATION,
};
export const time_zone = {
    form: 'list',
    list: TIME_ZONE_ABBREVIATION.concat(TIME_ZONE_LOCATION),
};
export const time_zone_content = {
    form: 'hash',
    link: 'time_zone_location',
    bond: {
        name: { like: 'string' },
        alternativeName: { like: 'string' },
        group: { like: 'string', list: true },
        continentCode: { like: 'string' },
        continentName: { like: 'string' },
        countryName: { like: 'string' },
        countryCode: { like: 'string' },
        mainCities: { like: 'string', list: true },
        rawOffsetInMinutes: { like: 'integer' },
        abbreviation: { like: 'string' },
    },
    hash: TIME_ZONE_HASH,
};
export const time_zone_abbreviation_content = {
    form: 'hash',
    link: 'time_zone_abbreviation',
    bond: {
        name: { like: 'string', list: true },
    },
    hash: TIME_ZONE_ABBREVIATION_HASH,
};
//# sourceMappingURL=source.js.map