import type { TenantPlan } from "./schema";

export type PlanResource = "properties" | "customers" | "members" | "presentations";

export const PLAN_LIMIT_EXCEEDED = "PLAN_LIMIT_EXCEEDED";

const INF = Number.POSITIVE_INFINITY;

export const PLAN_LIMITS: Record<TenantPlan, Record<PlanResource, number>> = {
  free:       { properties: 15,  customers: 25,  members: 1,   presentations: 5  },
  starter:    { properties: 50,  customers: 100, members: 3,   presentations: 20 },
  pro:        { properties: 200, customers: 500, members: 10,  presentations: 50 },
  enterprise: { properties: INF, customers: INF, members: INF, presentations: INF },
};

export const PLAN_NAMES: Record<TenantPlan, string> = {
  free:       "Ücretsiz",
  starter:    "Başlangıç",
  pro:        "Pro",
  enterprise: "Enterprise",
};

export const RESOURCE_LABELS: Record<PlanResource, string> = {
  properties:    "aktif ilan",
  customers:     "müşteri",
  members:       "ekip üyesi",
  presentations: "sunum",
};
