export const YES_NO_OPTIONS = [
  { id: '1', fullName: '是' },
  { id: '0', fullName: '否' },
];

export const ENABLE_OPTIONS = [
  { id: '1', fullName: '启用' },
  { id: '0', fullName: '停用' },
];

export const SIGN_RULE_OPTIONS = [
  { id: 'scan', fullName: '仅扫码' },
  { id: 'both', fullName: '扫码+在线' },
];

export function labelOfYesNo(v?: string) {
  return YES_NO_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}

export function labelOfSignRule(v?: string) {
  return SIGN_RULE_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}

export function labelOfEnabled(v?: string) {
  return ENABLE_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}
