function resolvePageRouteMetadata(pattern, metadata) {
  return {
    pattern: pattern || "/",
    requireAuth: metadata?.requireAuth,
    requireRoles: Array.isArray(metadata?.requireRoles) ? [...metadata.requireRoles] : void 0,
    requireFeatures: Array.isArray(metadata?.requireFeatures) ? [...metadata.requireFeatures] : void 0,
    requireCustomerAuth: metadata?.requireCustomerAuth,
    requireCustomerFeatures: Array.isArray(metadata?.requireCustomerFeatures) ? [...metadata.requireCustomerFeatures] : void 0,
    nav: metadata?.nav,
    title: metadata?.pageTitle ?? metadata?.title,
    titleKey: metadata?.pageTitleKey ?? metadata?.titleKey,
    group: metadata?.pageGroup ?? metadata?.group,
    groupKey: metadata?.pageGroupKey ?? metadata?.groupKey,
    icon: metadata?.icon,
    order: metadata?.pageOrder ?? metadata?.order,
    priority: metadata?.pagePriority ?? metadata?.priority,
    navHidden: metadata?.navHidden,
    visible: metadata?.visible,
    enabled: metadata?.enabled,
    breadcrumb: metadata?.breadcrumb,
    pageContext: metadata?.pageContext,
    placement: metadata?.placement
  };
}
function resolveDeclaredPageRouteMetadata(metadata) {
  const { pattern: _pattern, ...resolved } = resolvePageRouteMetadata("/", metadata);
  const declared = {};
  for (const [key, value] of Object.entries(resolved)) {
    if (value !== void 0) declared[key] = value;
  }
  return declared;
}
export {
  resolveDeclaredPageRouteMetadata,
  resolvePageRouteMetadata
};
//# sourceMappingURL=pageRouteMetadata.js.map
