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

export type ReviewPriceItem = {
  section: "holiday-homes" | "local-services" | "eat-drink" | "shops-supplies" | "safari-activities";
  packageName: string;
  slots: string;
  monthOneLabel: string;
  monthTwoLabel: string;
  monthThreeLabel: string;
  standardPriceLabel: string;
  publicLabel: string;
  privateOnly: boolean;
};

// Month 2 and Month 3 pre-launch values used by admin workflows. Month 1 is free.
export const accommodationReviewPrices: Record<AccommodationTier, number> = {
  standard: 150,
  featured: 350,
  "top-featured": 350,
  partner: 5000,
};

export const reviewRateCard: ReviewPriceItem[] = [
  { section: "holiday-homes", packageName: "MPC Premium Partner Holiday Home", slots: "1 total, currently occupied by Marlotii Safari House", monthOneLabel: "Allocated / not publicly available", monthTwoLabel: "Not publicly available", monthThreeLabel: "Not publicly available", standardPriceLabel: "R5,000 p/m if opened later", publicLabel: "MPC Premium Partner", privateOnly: true },
  { section: "holiday-homes", packageName: "MPC Top Featured Holiday Home", slots: "3 external positions", monthOneLabel: "Free", monthTwoLabel: "R350", monthThreeLabel: "R350", standardPriceLabel: "R3,500 p/m from month 4", publicLabel: "MPC Top Featured Holiday Home", privateOnly: false },
  { section: "holiday-homes", packageName: "MPC Featured Holiday Home", slots: "5 positions", monthOneLabel: "Free", monthTwoLabel: "R350", monthThreeLabel: "R350", standardPriceLabel: "R2,500 p/m from month 4", publicLabel: "MPC Featured Holiday Home", privateOnly: false },
  { section: "holiday-homes", packageName: "MPC Listed Holiday Home", slots: "6 positions", monthOneLabel: "Free", monthTwoLabel: "R150", monthThreeLabel: "R150", standardPriceLabel: "R750 p/m from month 4", publicLabel: "MPC Listed Holiday Home", privateOnly: false },
  { section: "local-services", packageName: "Top Featured Local Service", slots: "4 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R150", monthThreeLabel: "R150", standardPriceLabel: "R1,500 p/m from month 4", publicLabel: "Top Featured Local Service", privateOnly: false },
  { section: "local-services", packageName: "Featured Local Service", slots: "12 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R150", monthThreeLabel: "R150", standardPriceLabel: "R750 p/m from month 4", publicLabel: "Featured Local Service", privateOnly: false },
  { section: "eat-drink", packageName: "Top Featured Eat & Drink Listing", slots: "2 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R200", monthThreeLabel: "R200", standardPriceLabel: "R1,750 p/m from month 4", publicLabel: "Top Featured Eat & Drink", privateOnly: false },
  { section: "eat-drink", packageName: "Featured Eat & Drink Listing", slots: "4 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R200", monthThreeLabel: "R200", standardPriceLabel: "R950 p/m from month 4", publicLabel: "Featured Eat & Drink", privateOnly: false },
  { section: "shops-supplies", packageName: "Top Featured Shops & Supplies Listing", slots: "2 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R200", monthThreeLabel: "R200", standardPriceLabel: "R1,750 p/m from month 4", publicLabel: "Top Featured Shops & Supplies", privateOnly: false },
  { section: "shops-supplies", packageName: "Featured Shops & Supplies Listing", slots: "4 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R200", monthThreeLabel: "R200", standardPriceLabel: "R950 p/m from month 4", publicLabel: "Featured Shops & Supplies", privateOnly: false },
  { section: "safari-activities", packageName: "Top Featured Safari & Activity Listing", slots: "2 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R250", monthThreeLabel: "R250", standardPriceLabel: "R2,250 p/m from month 4", publicLabel: "Top Featured Safari & Activity", privateOnly: false },
  { section: "safari-activities", packageName: "Featured Safari & Activity Listing", slots: "4 positions during pre-launch", monthOneLabel: "Free", monthTwoLabel: "R250", monthThreeLabel: "R250", standardPriceLabel: "R1,250 p/m from month 4", publicLabel: "Featured Safari & Activity", privateOnly: false },
];

export function publicReviewPriceLabel(priceLabel: string, freeLabel = "Free") {
  return priceLabel === "R0" || priceLabel.toLowerCase() === "free" ? freeLabel : priceLabel;
}
