import { Request } from '../../models/request';
import { AuthenticatedUser } from './authenticated-user';
import { CountryCode } from 'src/app/hmg-common/ui/mobile-number/international-mobile/models/country-code.model';

export class GetLoginInfoRequest extends Request {
    NationalID: string;
    MobileNo: string;
    DeviceToken: string;
    PatientID: number;
    ProjectOutSA: boolean;
    LoginType: number; // 2 by patient id  , 1 by identification number
    ZipCode: string;
    PatientMobileNumber: string; // same as mobileNO,
    SearchType: number; // 2
    PatientIdentificationID: string // ""
    isRegister: boolean; // false
    constructor(user: AuthenticatedUser) {
        super();
        // this.NationalID = user.IdentificationNo;
        // this.MobileNo = this.PatientMobileNumber =  user.MobileNo;
        // this.DeviceToken = user.deviceToken;
        // this.PatientID = user.PatientID;
        // this.ProjectOutSA = user.PatientOutSA ;
        this.LoginType = 2;
        this.ZipCode = CountryCode.localCode( user.ZipCode);
        this.SearchType = 2;
        this.PatientIdentificationID = '';
        this.isRegister = false;
    }
}