using System;
using System.Collections.Generic;
using UnityEngine;

namespace Infrastructure.Unity
{
    [CreateAssetMenu(fileName = "LevelDefinition", menuName = "Decay Grid/Level Definition")]
    public class LevelDefinition : ScriptableObject
    {
        [SerializeField] private int gridSizeX = 10;
        [SerializeField] private int gridSizeY = 10;
        [SerializeField] private float floorHeightDistance = 15f;
        [SerializeField] private FloorConfig[] floors =
        {
            new() { pattern = FloorPatternType.Square },
            new() { pattern = FloorPatternType.Donut },
            new() { pattern = FloorPatternType.Circle }
        };

        public int GridSizeX => gridSizeX;
        public int GridSizeY => gridSizeY;
        public float FloorHeightDistance => floorHeightDistance;
        public int FloorCount => floors.Length;
        public IReadOnlyList<FloorConfig> Floors => floors;
    }

    [Serializable]
    public class FloorConfig
    {
        public FloorPatternType pattern;
    }

    public enum FloorPatternType
    {
        Square,
        Donut,
        Circle
    }
}
