﻿using JLGames.RocketDriver.CSharp.Event;
using JLGames.RocketDriver.Games.RpgMaterial.Material;
using JLGames.RocketDriver.Games.RpgMaterial.User;

namespace JLGames.RocketDriver.Games.RpgMaterial.Service
{
    /// <summary>
    /// The base interface of the material service, which each material service instance must implement.
    /// 材料服务的基础接口，每一个材料服务实例必须实现。
    /// </summary>
    public interface IMaterialService : IEventDispatcher
    {
        /// <summary>
        /// Material types currently managed by Material Services
        /// 当前材料服务管理的材料类型
        /// </summary>
        int MaterialType { get; }

        /// <summary>
        /// Whether the user data uses a unique Id
        /// 用户数据是否使用唯一Id
        /// </summary>
        bool IsUnique { get; }

        /// <summary>
        /// Initialize the service
        /// 初始化服务
        /// </summary>
        void InitService();
    }

    public interface IMaterialService<TU, TM, TCfg> : IMaterialService,
        IMaterialSet<TM, TCfg>, IUserMaterialSet<TU, TM, TCfg>
        where TM : IMaterial<TCfg> where TU : IUserMaterial<TM, TCfg>
    {
    }
}