import type { statusType } from "@/api/order/order";
export const options: { [key in optionsType]: options[] } = {

}
export type optionsType = string;

export function returnOptions(type: optionsType) {
  return options[type];
}

export function returnOptionsLabel(optionsType: optionsType, value: string | number) {
  const options = returnOptions(optionsType);
  if (!options) {
    return "";
  }
  const option = options.find((item) => item.value === value);
  return option ? option.label : "";
}


export interface options {
  label: string;
  value: string | number;
  [property: string]: any;
}
export interface statusOptions extends options {
  value: statusType;
}

export type payTypeValue =
  | ""
  | "cash"
  | "bank"
  | "scanCode"
  | "deposit"
  | "vipPay"
  | "arrears"
  | "virtual"
  | "arrears";

export interface payTypeOptions extends options {
  value: payTypeValue;
}
