using System;
using System.Collections.Generic;

namespace EngineSdkConverter.Unity.SDK
{
    //***** 互推组件功能统一参数 *****//
    public class GridGameModuleBuilder
    {
        public class GridGameModule
        {
            public string gridGamePanelId;
            public string gridCount;
            public string size;
            public Dictionary<string, int> position;
            public Dictionary<string, string> query;
        }

        private GridGameModule _gridGameModule;

        public GridGameModuleBuilder()
        {
            _gridGameModule = new GridGameModule();
        }

        public GridGameModuleBuilder SetGridCount(string gridCount)
        {
            _gridGameModule.gridCount = gridCount;
            return this;
        }

        public GridGameModuleBuilder SetSize(string size)
        {
            _gridGameModule.size = size;
            return this;
        }

        public GridGameModuleBuilder SetPosition(Dictionary<string, int> position)
        {
            _gridGameModule.position = position;
            return this;
        }

        public GridGameModuleBuilder SetQuery(Dictionary<string, string> query)
        {
            _gridGameModule.query = query;
            return this;
        }

        public GridGameModule Build()
        {
            return _gridGameModule;
        }
    }

    public class GridGamePanel
    {
        private GridGameModuleBuilder.GridGameModule _gridGameModule;
        public GridGamePanel CreateGridGamePanel(GridGameModuleBuilder.GridGameModule gridGameModule, Action<string, object> callback)
        {
            _gridGameModule = gridGameModule;
            return this;
        }

        public GridGamePanel ShowGridGamePanel()
        {
            NativeInterface.ShowGridGamePanel(_gridGameModule.gridGamePanelId);
            return this;
        }

        public GridGamePanel HideGridGamePanel()
        {
            NativeInterface.HideGridGamePanel(_gridGameModule.gridGamePanelId);
            return this;
        }

        public GridGamePanel DestroyGridGamePanel()
        {
            NativeInterface.DestroyGridGamePanel(_gridGameModule.gridGamePanelId);
            return this;
        }
    }

    //*************************************

}