using System;
using Cute;
using UnityEngine;

public class CardDetailFilterOffButton : MonoBehaviour
{
	[SerializeField]
	private UILabel _label;

	[SerializeField]
	private UIButton _button;

	[SerializeField]
	private UISprite _backGround;

	private string _keyword;

	public Action<string> OnClick { get; set; }

	private void Start()
	{
		EventDelegate.Add(_button.onClick, delegate
		{
			OnClick.Call(_keyword);
		});
	}

	public void Initialize(string text)
	{
		_keyword = text;
		_label.text = text;
		_label.InitializeFont();
		_label.ProcessText();
		_backGround.ResetAndUpdateAnchors();
	}
}
