/**
 * Serializable subset of Lingui's MessageDescriptor — header config passes
 * through route loaders/beforeLoad, whose results must be serializable.
 * msg`` descriptors are assignable to this shape.
 */
interface HeaderTitleMessage {
  id: string;
  message?: string;
  comment?: string;
}

interface HeaderConfig {
  /** Plain strings render as-is (data-derived names); use a msg`` descriptor for translatable titles. */
  title?: string | HeaderTitleMessage;
  /** ICU values when title is a descriptor, e.g. msg`Manage {name}` + { name }. */
  titleValues?: Record<string, string | number>;
  withBackButton?: boolean;
  collapsed?: boolean;
  settingsLink?: string;
}

export type { HeaderConfig, HeaderTitleMessage };
