const DEFAULT_SETTINGS = {
  pageSize: 5,
  kind: "all"
};
function hydrateNewCustomersSettings(raw) {
  if (!raw || typeof raw !== "object") return { ...DEFAULT_SETTINGS };
  const input = raw;
  const parsedPageSize = Number(input.pageSize);
  const pageSize = Number.isFinite(parsedPageSize) && parsedPageSize >= 1 && parsedPageSize <= 20 ? Math.floor(parsedPageSize) : DEFAULT_SETTINGS.pageSize;
  const kind = input.kind === "person" || input.kind === "company" || input.kind === "all" ? input.kind : DEFAULT_SETTINGS.kind;
  return {
    pageSize,
    kind
  };
}
export {
  DEFAULT_SETTINGS,
  hydrateNewCustomersSettings
};
//# sourceMappingURL=config.js.map
