export const statusOptions = [
  { value: "0", label: "禁用",type:'warning' },
  { value: "1", label: "启用",type:'success' },
];

export const platformOptions = [
  { value: "0", label: "无对接" },
  { value: "1", label: "有赞平台" },
  { value: "2", label: "BBC" }
]

export const platformTypeOptions = [
  { value: "1", label: "ToB" },
  { value: "2", label: "ToC" },
]


export const hasPlatformOptions = [
  { value: "0", label: "不选支付渠道" },
  { value: "1", label: "选择支付渠道" },
]


export const rules = {
  platform_name: [{ required: true, message: "平台名称不能为空", trigger: "blur" }],
  platform_type: [{ required: true, message: "请选择对接平台", trigger: "change" }],
  use_type: [{ required: true, message: "请选择平台类型", trigger: "change" }],
  is_select_pay_rate: [
    { required: true, message: "请选择是否开启支付渠道", trigger: "change" },
  ],
  pay_list: [
    {
      type: "array",
      required: true,
      message: "内容配置不能为空",
      trigger: "change",
    },
  ]
}

export const initialData = () => ({
  use_type: '1',
  platform_name: '', 
  platform_type: '0',
  is_select_pay_rate: '0',
  pay_list: [],
  desc: 0
})
