/**
 * @copyright Sister Software
 * @license AGPL-3.0
 * @author Teffen Ellis, et al.
 */
/**
 * Placetype roles in a hierarchy.
 */
export const PlacetypeRoles = ["optional", "common", "common_optional"];
/**
 * The order of placetype roles in a hierarchy.
 */
export const PlacetypeRoleOrder = Object.fromEntries(PlacetypeRoles.map((role, index) => [role, index]));
export const WOFPrefix = "wof:";
/**
 * Convert a prefixed placetype definition to a standard placetype definition.
 */
export function normalizePlacetypeDefinition(initLike) {
    const spec = {};
    for (const [key, value] of Object.entries(initLike)) {
        const normalizedKey = key.startsWith(WOFPrefix) ? key.slice(WOFPrefix.length) : key;
        spec[normalizedKey] = value;
    }
    return spec;
}
//# sourceMappingURL=definition.js.map