import type { AccommodationTier, SupplierPackage } from "./mpc-types";

// Final MPC pricing is defined in MPC_FINAL_PRICING_AND_HOLIDAY_HOME_STRUCTURE.md.
// These numeric defaults support admin workflow storage only. Month 1 is free.
export const accommodationLaunchPackageDefaults: Record<AccommodationTier, number> = {
  standard: 150,
  featured: 350,
  "top-featured": 350,
  partner: 5000,
};

export const accommodationLaunchPackageNames: Record<AccommodationTier, string> = {
  standard: "MPC Listed Holiday Home",
  featured: "MPC Featured Holiday Home",
  "top-featured": "MPC Top Featured Holiday Home",
  partner: "MPC Premium Partner Holiday Home",
};

export const accommodationLaunchPackageDescriptions: Record<AccommodationTier, string> = {
  standard: "Card-only Marloth Park holiday-home listing with one image, short summary and direct contact button.",
  featured: "Selected Marloth Park holiday-home listing with stronger presentation and direct enquiry access.",
  "top-featured": "Full showcase Marloth Park holiday-home listing with homepage eligibility and visitor-ready details.",
  partner: "Highest MPC holiday-home position, currently occupied by Marlotii Safari House unless opened later.",
};

export const accommodationLaunchPackageBilling: Record<AccommodationTier, string> = {
  standard: "Month 1 free; months 2-3 R150; from month 4 R750 p/m",
  featured: "Month 1 free; months 2-3 R350; from month 4 R2,500 p/m",
  "top-featured": "Month 1 free; months 2-3 R350; from month 4 R3,500 p/m",
  partner: "Allocated to Marlotii Safari House; R5,000 p/m if opened later",
};

export const accommodationFounderMonths: Record<AccommodationTier, number> = {
  standard: 1,
  featured: 1,
  "top-featured": 1,
  partner: 0,
};

export const launchRevenueAddOns = {
  lastMinuteBoostMin: 0,
  lastMinuteBoostMax: 0,
  verifiedLeadFee: 0,
  featuredLeadFee: 0,
  setupFeeMin: 0,
  setupFeeMax: 0,
  commissionMinPercent: 0,
  commissionMaxPercent: 0,
};

export const supplierLaunchPackageDefaults: Record<SupplierPackage, number> = {
  basic: 0,
  featured: 150,
  premium: 150,
  sponsor: 150,
};

export const supplierLaunchPackageNames: Record<SupplierPackage, string> = {
  basic: "Free Onboarding Listing",
  featured: "Featured Local Option",
  premium: "Top Featured Local Option",
  sponsor: "Top Featured Local Option",
};

export const supplierLaunchPackageDescriptions: Record<SupplierPackage, string> = {
  basic: "Month 1 free onboarding while MPC reviews the listing.",
  featured: "Featured local option package. Category-specific month 2, month 3 and standard pricing is defined in MPC_FINAL_PRICING_AND_HOLIDAY_HOME_STRUCTURE.md.",
  premium: "Top Featured local option package. Category-specific month 2, month 3 and standard pricing is defined in MPC_FINAL_PRICING_AND_HOLIDAY_HOME_STRUCTURE.md.",
  sponsor: "Top Featured local option package. Category-specific month 2, month 3 and standard pricing is defined in MPC_FINAL_PRICING_AND_HOLIDAY_HOME_STRUCTURE.md.",
};

export const supplierLaunchPackageBilling: Record<SupplierPackage, string> = {
  basic: "Month 1 free onboarding",
  featured: "See final MPC pricing structure by category",
  premium: "See final MPC pricing structure by category",
  sponsor: "See final MPC pricing structure by category",
};

export function formatRand(value: number) {
  return value ? `R${Math.round(value).toLocaleString("en-ZA")}` : "Free";
}
