import { clientReizePublish, clientReizeSubscribe } from '@/utils/mqtt';

export const return_home_status = {
  canceled: '取消或终止',
  failed: '失败',
  in_progress: '执行中',
  ok: '执行成功',
  paused: '暂停',
  rejected: '拒绝',
  sent: '已下发',
  timeout: '超时',
};
export const eventsTopicReize = (data) => {
  // 发送消息
  clientReizePublish('thing/product/8UUXN5400A079H/events', data);
};
export const events_replyTopicReize = () => {
  // 订阅消息
  clientReizeSubscribe('thing/product/8UUXN5400A079H/events_reply');
};

export const servicesTopicReize = (data) => {
  // 发送消息
  clientReizePublish('thing/product/8UUXN5400A079H/services', data);
};
export const services_replyTopicReize = () => {
  // 订阅消息
  clientReizeSubscribe('thing/product/8UUXN5400A079H/services_reply');
};
export const drcDownTopicReize = (data) => {
  // 发送消息thing/product/{gateway_sn}/drc/down
  clientReizePublish('thing/product/8UUXN5400A079H/drc/down', data);
};
export const eventsTopicSubscribeReize = () => {
  // 发送消息
  clientReizeSubscribe('thing/product/8UUXN5400A079H/events');
};
