import { registerLocale, getNames } from "i18n-iso-countries"; import enLocale from "i18n-iso-countries/langs/en.json"; registerLocale(enLocale); export const SITE_TYPE_OPTIONS = [ { id: "WAREHOUSE", label: "Warehouse" }, { id: "OFFICE", label: "Office" }, { id: "STORE", label: "Store" }, { id: "FACTORY", label: "Factory" }, { id: "DISTRIBUTION_CENTER", label: "Distribution Center" }, ]; export const COUNTRY_OPTIONS = Object.entries(getNames("en")).map(([code, name]) => ({ id: code, label: `${name} (${code})`, })); // Intl.supportedValuesOf is not available in older browsers (e.g. pre-Chromium Edge, older Safari). // When unavailable, return null so forms can fall back to a free-text input. export const TIMEZONE_OPTIONS = typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone").map((tz) => ({ id: tz, label: tz, })) : null;