using System;
using System.Collections.Generic;
using Code.InterfaceAdapters.Profile;
using TMPro;
using UnityEngine;
using UniRx;

namespace Code.View
{
    public class ProfileView : ViewBase
    {
        [SerializeField] private TextMeshProUGUI _userName;

        private ProfileViewModel _model;

        public void Configure(ProfileViewModel model)
        {
            _model = model;

            _model
                .UserName
                .Subscribe(userName => _userName.SetText(userName))
                .AddTo(_disposables);
        }
    }
}