"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.VIEWPORT_GUTTER = exports.MAX_HEIGHT_FRACTION = exports.DEFAULT_MAX_WIDTH = exports.COZY_SPACING = exports.COMPACT_SPACING = exports.CARD_RADIUS = void 0;
exports.resolveSpacing = resolveSpacing;
var _tokens = require("../styles/tokens.js");
/**
 * Shared layout constants for `<CenteredDialog>`, kept in one module so the
 * native and web forks render identically. All values are Bloom theme tokens
 * (`styles/tokens`) — no ad-hoc magic numbers.
 *
 * COMPACT is the priority: the `compact` spacing set is the default and is
 * deliberately tight (≈`space.md`), so the card reads snug out of the box.
 * The `cozy` set is the opt-out (`compact={false}`) for roomier dialogs.
 */

/** Default max card width — comfortable for a compact dialog. */
const DEFAULT_MAX_WIDTH = exports.DEFAULT_MAX_WIDTH = 440;

/** Card height is capped at this fraction of the viewport; body scrolls. */
const MAX_HEIGHT_FRACTION = exports.MAX_HEIGHT_FRACTION = 0.8;

/** Card corner radius (token: `borderRadius.lg` = 16). */
const CARD_RADIUS = exports.CARD_RADIUS = _tokens.borderRadius.lg;

/** Outer gutter between the card edge and the viewport edge (token `space.lg`). */
const VIEWPORT_GUTTER = exports.VIEWPORT_GUTTER = _tokens.space.lg;
/**
 * Compact (default) — tight, snug spacing built on `space.md` (12).
 *
 *   pad        = space.md  (12)
 *   headerGap  = space.sm  (8)
 *   footerGap  = space.md  (12)
 *   contentGap = space.sm  (8)
 */
const COMPACT_SPACING = exports.COMPACT_SPACING = {
  pad: _tokens.space.md,
  headerGap: _tokens.space.sm,
  footerGap: _tokens.space.md,
  contentGap: _tokens.space.sm
};

/**
 * Cozy (`compact={false}`) — roomier spacing built on `space.xl` (20).
 *
 *   pad        = space.xl   (20)
 *   headerGap  = space.md   (12)
 *   footerGap  = space.lg   (16)
 *   contentGap = space.md   (12)
 */
const COZY_SPACING = exports.COZY_SPACING = {
  pad: _tokens.space.xl,
  headerGap: _tokens.space.md,
  footerGap: _tokens.space.lg,
  contentGap: _tokens.space.md
};
function resolveSpacing(compact) {
  return compact ? COMPACT_SPACING : COZY_SPACING;
}
//# sourceMappingURL=centered-dialog-tokens.js.map