import { StageId } from '@core/types'

export const Stage = process.env.APP_MODE as StageId
export const DASHBOARD_URL = process.env.DASHBOARD_URL ?? 'http://localhost:4200'
export const CUSTOMER_APP_URL = process.env.CUSTOMER_APP_URL ?? 'http://localhost:4202'

const RESERVATION_WIDGET_URL_DEFAULTS: Record<string, string> = {
	[StageId.PRODUCTION]: 'https://reservation-widget.kadicon.de/production',
	[StageId.STAGING]: 'https://reservation-widget.kadicon.de/staging',
	[StageId.LOCAL]: 'http://localhost:4203',
}

/** Public base URL of the reservation widget bundle; used to build guest self-service links. */
export const RESERVATION_WIDGET_PUBLIC_URL =
	process.env.RESERVATION_WIDGET_PUBLIC_URL ?? RESERVATION_WIDGET_URL_DEFAULTS[Stage] ?? 'http://localhost:4203'
