/** GET /admin/play-types */
export type AdminPlayTypeRow = {
  id: number;
  play_code: string;
  category: string;
  dimension: number | null;
  bet_mode: string | null;
  display_name: string | null;
  is_enabled: boolean;
  sort_order: number;
  supports_multi_number: boolean;
  reserved_rule_json: unknown;
  updated_at: string | null;
};

export type AdminPlayTypesData = {
  items: AdminPlayTypeRow[];
};

export type PaginatedMeta = {
  current_page: number;
  per_page: number;
  total: number;
  last_page: number;
};

export type ConfigVersionSummary = {
  id: number;
  version_no: number;
  status: string;
  effective_at: string | null;
  updated_by: number | null;
  reason: string | null;
  created_at: string | null;
  updated_at: string | null;
};

export type PlayConfigItemRow = {
  id: number;
  play_code: string;
  category: string | null;
  dimension: number | null;
  bet_mode: string | null;
  display_name: string | null;
  is_enabled: boolean;
  min_bet_amount: number;
  max_bet_amount: number;
  display_order: number;
  supports_multi_number: boolean;
  reserved_rule_json: unknown;
  rule_text_zh: string | null;
  rule_text_en: string | null;
  rule_text_ne: string | null;
  extra_config_json: unknown;
};

export type PlayConfigVersionDetail = ConfigVersionSummary & {
  items: PlayConfigItemRow[];
};

export type OddsItemRow = {
  id: number;
  play_code: string;
  prize_scope: string;
  odds_value: number;
  rebate_rate: string;
  commission_rate: string;
  currency_code: string;
  extra_config_json: unknown;
};

export type OddsVersionDetail = ConfigVersionSummary & {
  items: OddsItemRow[];
};

export type RiskCapItemRow = {
  id: number;
  draw_id: number | null;
  normalized_number: string;
  cap_amount: number;
  cap_type: string;
};

export type RiskCapVersionDetail = ConfigVersionSummary & {
  items: RiskCapItemRow[];
};

export type ConfigVersionListData = {
  items: ConfigVersionSummary[];
  meta: PaginatedMeta;
};
