import { PIRequest } from './pi';
import { LocaleCode } from '@ucap-webmessenger/core';
import { APIEncoder, ParameterUtil } from '@ucap-webmessenger/api';

export interface PasswordInitStep1Request extends PIRequest {
  localeCode: LocaleCode;
}

const passwordInitStep1EncodeMap = {
  localeCode: 'locale'
};

export const encodePasswordInitStep1: APIEncoder<PasswordInitStep1Request> = (
  req: PasswordInitStep1Request
) => {
  return ParameterUtil.encode(passwordInitStep1EncodeMap, req);
};
