import { DeviceType } from '@ucap-webmessenger/core';
import {
  APIRequest,
  APIResponse,
  APIEncoder,
  APIDecoder,
  ParameterUtil
} from '@ucap-webmessenger/api';

export interface TranslationSaveRequest extends APIRequest {
  userSeq: string;
  deviceType: DeviceType;
  token: string;
  roomId?: string;
  original?: string;
  srcLocale: string;
  destLocale: string;
}

export interface TranslationSaveResponse extends APIResponse {
  EventTransSeq?: string;
  RoomID?: string;
  RegDate?: string;
  SrcLocale?: string;
  DestLocale?: string;
  Original?: string;
  Translation?: string;
}

const translationSaveEncodeMap = {};

export const encodeTranslationSave: APIEncoder<TranslationSaveRequest> = (
  req: TranslationSaveRequest
) => {
  return ParameterUtil.encode(translationSaveEncodeMap, req);
};

export const decodeTranslationSave: APIDecoder<TranslationSaveResponse> = (
  res: any
) => {
  return {} as TranslationSaveResponse;
};
