"use client";
import { createContext, useContext } from "react";

/** Personalization from the remarketing link ?u=<vHashedEmail> (GET /api/me).
 *  Empty {} when there's no link / lookup miss → the funnel uses generic copy. */
export type Profile = {
  iUserID?: number;
  name?: string;
  cigsPerDay?: number;
  gender?: "male" | "female";
  country?: string;
  currency?: "INR" | "USD";
  eligible?: boolean;
};

export const ProfileContext = createContext<Profile>({});
export const useProfile = () => useContext(ProfileContext);
