using System;
using UniRx;
using UnityEngine;
using UnityEngine.UI;

public class MissionTabView : MonoBehaviour
{
    [SerializeField] private Button button;
    [SerializeField] private GameObject onObject;
    [SerializeField] private GameObject offObject;
    [SerializeField] private GameObject indicator;
    public IObservable<Unit> ClickObservable => button.OnClickAsObservable().TakeUntilDestroy(this);
    public void SetToggle(bool active)
    {
        onObject.SetActive(active);
        offObject.SetActive(!active);
    }

    public void SetIndicator(bool active)
    {
        indicator.SetActive(active);
    }
}