using System;
using UnityEngine;

public class RandomPresetMgr : BaseMgr<RandomPresetMgr>
{
	private void Start()
	{
		UIRoot componentInParent = base.GetComponentInParent<UIRoot>();
		this.m_goRandomPresetPanel = componentInParent.transform.Find("RandomPresetPanel").gameObject;
		if (this.m_goRandomPresetPanel == null)
		{
			Debug.LogError(string.Format("{0}が見つかりませんでした", "RandomPresetPanel"));
			return;
		}
		this.m_randomPresetCtrl = this.m_goRandomPresetPanel.GetComponent<RandomPresetCtrl>();
		this.m_randomPresetCtrl.Init(this.m_goRandomPresetPanel);
		this.m_goRandomPresetPanel.SetActive(false);
	}

	public void OnButtonClick()
	{
		string name = UIButton.current.name;
		this.m_randomPresetCtrl.OnButtonClick(name);
	}

	public void Execute()
	{
		this.m_randomPresetCtrl.Execute();
	}

	public void OnAllButtonClick()
	{
		this.m_randomPresetCtrl.OnAllButtonClick();
	}

	public void OpenRandomPresetPanel()
	{
		this.m_randomPresetCtrl.LoadMaidPropData();
		this.m_goRandomPresetPanel.SetActive(true);
	}

	public void CloseRandomPresetPanel()
	{
		this.m_goRandomPresetPanel.SetActive(false);
	}

	private GameObject m_goRandomPresetPanel;

	private RandomPresetCtrl m_randomPresetCtrl;
}
