package member

import (
	domusecase "gateway/internal/model/member/domain/usecase"
	"gateway/internal/types"
)

func memberDTOToTypes(d *domusecase.MemberDTO) *types.MemberMeData {
	if d == nil {
		return nil
	}
	return &types.MemberMeData{
		TenantID:              d.TenantID,
		UID:                   d.UID,
		ZitadelEmail:          d.ZitadelEmail,
		DisplayName:           d.DisplayName,
		Avatar:                d.Avatar,
		Phone:                 d.Phone,
		Language:              d.Language,
		Currency:              d.Currency,
		Status:                string(d.Status),
		Origin:                string(d.Origin),
		BusinessEmail:         d.BusinessEmail,
		BusinessEmailVerified: d.BusinessEmailVerified,
		BusinessPhone:         d.BusinessPhone,
		BusinessPhoneVerified: d.BusinessPhoneVerified,
		TOTPEnrolled:          d.TOTPEnrolled,
		CreateAt:              d.CreateAt,
		UpdateAt:              d.UpdateAt,
	}
}
