/** * Channel discount — shared selection logic (mirrors smart-stays contracts/ts/channel-discount.ts). * * Acquisition discount per channel lives in `property_channel_discounts`. * Wallet loyalty discounts are separate and must never share this path. */ export type DiscountChannel = "website" | "agent"; export declare const DISCOUNT_CHANNELS: readonly DiscountChannel[]; /** Fallback when neither a channel row nor legacy value is present. */ export declare const DEFAULT_CHANNEL_DISCOUNT_PCT = 10; /** DB CHECK headroom — dashboard offers 0..50. */ export declare const MAX_CHANNEL_DISCOUNT_PCT = 50; export interface ChannelDiscountRow { channel: string; discount_pct: number | null; } export declare function isDiscountChannel(value: unknown): value is DiscountChannel; /** Clamp to [0, MAX]. Non-finite input → 0. */ export declare function clampDiscountPct(pct: number): number; /** * Resolve acquisition discount (%) for a channel. * * Precedence: * 1. explicit `property_channel_discounts` row for the channel * 2. legacy `properties.direct_booking_discount` * 3. {@link DEFAULT_CHANNEL_DISCOUNT_PCT} */ export declare function pickChannelDiscountPct(rows: ChannelDiscountRow[] | null | undefined, channel: DiscountChannel, legacyPct?: number | null): number;