import { reactive } from "vue"

// 验证规则 - 添加油站
const addStationRules = reactive({
    cloudService: [{ required: true, message: '请输入云端服务地址', trigger: 'blur', }],
    servicePort: [{ required: true, message: '请输入开放给油机端口', trigger: 'blur', }],
    smallProgram: [{ required: true, message: '请输入小程序地址', trigger: 'blur', }],
    buildId: [{ required: true, message: '请输入站点id', trigger: 'blur', }],
    webSocketPort: [{ required: true, message: '请输入webSocket端口', trigger: 'blur', }],
    icardService: [{ required: true, message: '请输入icard数据库', trigger: 'blur', }],
    mqttService: [{ required: true, message: '请输入mqtt连接地址', trigger: 'blur', }],
    name: [{ required: true, message: '请输入油站名称', trigger: 'blur', }],
    longitude: [{ required: true, message: '请输入经度', trigger: 'blur', }],
    latitude: [{ required: true, message: '请输入纬度', trigger: 'blur', }],
  })
  
  // 验证规则 - 添加油罐
  const addDeviceRules = reactive({
    stationId: [{ required: true, message: '请输入油站ID', trigger: 'blur', }],
    number: [{ required: true, message: '请输入油罐号', trigger: 'blur', }],
    oilId: [{ required: true, message: '请输入油品ID', trigger: 'blur', }],
    oilName: [{ required: true, message: '请输入油品名', trigger: 'blur', }],
    capacity: [{ required: true, message: '请输入罐容量', trigger: 'blur', }],
  })
  
  // 验证规则 - 编辑油品
  const editOilRules = reactive({
    code: [{ required: true, message: '请输入油品码', trigger: 'blur', }],
    name: [{ required: true, message: '请输入油品名', trigger: 'blur', }],
    price: [{ required: true, message: '请输入单价', trigger: 'blur', }],
  })
  
  // 验证规则 - 编辑油枪
  const editOilGunRules = reactive({
    nozzleNum: [{ required: true, message: '请输入油枪号', trigger: 'blur', }],
    port: [{ required: true, message: '请输入连接FCC端口', trigger: 'blur', }],
    fuelPoint: [{ required: true, message: '请输入加油点', trigger: 'blur', }],
    internalNum: [{ required: true, message: '请输入内部油枪号', trigger: 'blur', }],
    tankId: [{ required: true, message: '请输入关联油罐ID', trigger: 'blur', }],
    tankNum: [{ required: true, message: '请输入关联油罐号', trigger: 'blur', }],
  })
  
  export {
    addStationRules,
    addDeviceRules,
    editOilRules,
    editOilGunRules,
  }