using System.Collections.Generic;
using ShiroginSDK.Runtime.Core.SDK;
using ShiroginSDK.Runtime.Shared.Constants;
using UnityEngine;
namespace ShiroginSDK.Editor.IAP
{
public static class IAPNameProvider
{
///
/// Returns all productIds from the active StoreRepository in SDKConfig.
///
public static IEnumerable GetIAPNames()
{
var config = Resources.Load(SDKConstants.ConfigResourcePath);
if (config == null || config.storeRepository == null) return new List { "⚠ No Repository Found" };
var list = new List();
var allItems = config.storeRepository.GetAll(); // ✅
foreach (var item in allItems)
if (item != null && !string.IsNullOrEmpty(item.productId))
list.Add(item.productId);
return list;
}
}
}