import 'server-only'; import { getCloudflareContext } from '@opennextjs/cloudflare'; /** Default off while Studio replaces the legacy paid commission funnel. * This never controls access to an existing order, support, or refunds. */ export function physicalCheckoutEnabled(): boolean { let flag: string | undefined; try { flag = (getCloudflareContext().env as { LUMEN_PHYSICAL_CHECKOUT_ENABLED?: string }) .LUMEN_PHYSICAL_CHECKOUT_ENABLED; } catch { // The binding isn't present in a standalone Next server/test. } return (flag ?? process.env.LUMEN_PHYSICAL_CHECKOUT_ENABLED) === 'true'; } export const physicalCheckoutPausedMessage = 'New physical orders are paused. Digital image creation is free in Studio.';