using KitsuneCafe.System;
using UnityEngine;
using Wacs.Core.Runtime;
using Wacs.Core.Types;
using Wacs.Core.Types.Defs;

namespace KitsuneCafe.Scripting
{
    [CreateAssetMenu(menuName = KitsuneCafeMenu.ModuleBinding + "Global Value")]
    public class GlobalValueBinding : ScriptableObject, IHostBinding
    {
        [SerializeField]
        private BindingPath bindingPath;
        public BindingPath BindingPath => bindingPath;

        [SerializeField]
        private ValType type;
        public ValType Type => type;

        [SerializeField]
        private Mutability mutability = Mutability.Immutable;
        public Mutability Mutability => mutability;

        public void Bind(WasmRuntime runtime)
        {
            var globalType = new GlobalType(type, mutability);
            //runtime.BindHostGlobal((module, entity), globalType, null);
        }
    }
}
