using asap.core; using game; using GameCore; using System; using System.Collections.Generic; using TMPro; using UniRx; using UnityEngine; using UnityEngine.UI; public struct RefreshPanelEvent { } public class MiniBattlePassPanel : MonoBehaviour { protected virtual MiniBattlePassType Type => MiniBattlePassType.LuckMagic; protected MiniBattlePassDataModel miniBP; Button btn_close; TMP_Text text_time; GameObject buy; Button btn_buy; Button btn_claim; Button btn_claim_gray; GameObject claim; GameObject done; protected TMP_Text text_buy; protected GameObject item; protected RectTransform contentRect; protected Transform content; protected ScrollRect scrollRect; protected VerticalLayoutGroup layoutGroup; int addSizeDelta; int startAdd; protected float itemHeight = 164f; protected float allHeight = 0f; protected virtual int showCount => 2; protected List miniBPItemDatas; List miniBattlePassItems = new List(); protected CompositeDisposable disposables = new CompositeDisposable(); protected string timerFormat; protected virtual void Awake() { miniBP = GContext.container.Resolve().GetModel(Type); miniBP.SetPanelData(); item = transform.Find("root/ScrollView/Viewport/Content/item").gameObject; item.SetActive(false); scrollRect = transform.Find("root/ScrollView").GetComponent(); content = transform.Find("root/ScrollView/Viewport/Content"); contentRect = content.GetComponent(); layoutGroup = content.GetComponent(); float spacing = layoutGroup.spacing; addSizeDelta = layoutGroup.padding.vertical; startAdd = layoutGroup.padding.top; itemHeight = item.GetComponent().sizeDelta.y + spacing; btn_close = transform.Find("root/btn_close").GetComponent