/**
 * Media sizing spec (single source of truth).
 *
 * Goal: show images at their real aspect ratio (no top/bottom cropping) while
 * keeping them bounded so an oversized upload can't take over the screen.
 *
 * Width is intentionally NOT touched here: a single image still fills 100% of
 * the bubble, whose width stays bounded by the existing message-container
 * max-widths. Only the height adapts (and is clamped).
 *
 * How it's applied to a single-image bubble (behaviour depends on orientation):
 *  - Landscape / square (width >= height): the frame fills the full width and
 *    follows the real ratio, capped at SINGLE_IMAGE_MAX_HEIGHT. Taller-than-cap
 *    images are cropped top/bottom (object-cover) — never any left/right bars.
 *  - Portrait (height > width): no height cap. The frame follows the real ratio
 *    so the whole image shows — full width, uncropped, no side bars — which
 *    makes the bubble tall. (Product chose "complete image" over "compact".)
 *  - When width/height are unknown (no backend value and not yet loaded), we
 *    fall back to the legacy fixed heights below so layout stays predictable.
 */

/** Height cap for landscape/square images (cropped top/bottom beyond this). */
export const SINGLE_IMAGE_MAX_HEIGHT = 260;

/**
 * Telegram-style multi-image albums. Cells are sized to each image's real
 * ratio; the whole mosaic is capped so a tall portrait-led album stays
 * reasonable (cells crop slightly via object-cover beyond the cap).
 */
export const ALBUM_MAX_HEIGHT = 420;
/** Gap between album tiles, in px. */
export const ALBUM_GAP = 3;

/**
 * Legacy responsive heights, used only when an attachment has no width/height.
 * Mirrors the previous fixed-height behaviour.
 */
export const SINGLE_IMAGE_FALLBACK_HEIGHT_CLASS =
  "h-[180px] min-[440px]:h-[210px] md:h-[260px] lg:h-[300px]";
