import type { SimCatalogProduct } from "@customer-portal/domain/services";
import type { MnpData } from "@customer-portal/domain/sim";

export interface StepConfig {
  number: number;
  title: string;
  completed: boolean;
}

export interface ActivationFeeDetails {
  name: string;
  amount: number;
}

export interface PlanDisplayProps {
  plan: SimCatalogProduct;
}

export interface BaseStepProps {
  onNext: () => void;
  onBack?: (() => void) | undefined;
}

export interface SimTypeStepProps extends BaseStepProps {
  simType: "eSIM" | "Physical SIM" | "";
  setSimType: (type: "eSIM" | "Physical SIM") => void;
  eid: string;
  setEid: (eid: string) => void;
  validate: () => boolean;
}

export interface ActivationStepProps extends BaseStepProps {
  activationType: "Immediate" | "Scheduled" | "";
  setActivationType: (type: "Immediate" | "Scheduled") => void;
  scheduledActivationDate: string;
  setScheduledActivationDate: (date: string) => void;
  activationFee?: ActivationFeeDetails | undefined;
  validate: () => boolean;
}

export interface AddonsStepProps extends BaseStepProps {
  addons: SimCatalogProduct[];
  selectedAddons: string[];
  setSelectedAddons: (addons: string[]) => void;
  planType: string;
}

export interface NumberPortingStepProps extends BaseStepProps {
  wantsMnp: boolean;
  setWantsMnp: (wants: boolean) => void;
  mnpData: MnpData;
  setMnpData: (data: MnpData) => void;
  activationType: "Immediate" | "Scheduled" | "";
  validate: () => boolean;
}

export interface ReviewOrderStepProps {
  plan: SimCatalogProduct;
  simType: "eSIM" | "Physical SIM" | "";
  eid: string;
  activationType: "Immediate" | "Scheduled" | "";
  scheduledActivationDate: string;
  wantsMnp: boolean;
  selectedAddons: string[];
  addons: SimCatalogProduct[];
  activationFee?: ActivationFeeDetails | undefined;
  monthlyTotal: number;
  oneTimeTotal: number;
  onBack: () => void;
  onConfirm: () => void;
  isDefault?: boolean | undefined;
}

export interface OrderTotals {
  monthly: number;
  oneTime: number;
}
