using LittleTown.Core;
using LittleTown.Core.Enums;
using Microsoft.AspNetCore.Components;

namespace LittleTown.Blazor.Client.Components
{
    public partial class TerrainCell
    {
        [Parameter, EditorRequired]
        public Tile Tile { get; init; }

        private string CssTileType { get; set; } = string.Empty;

        protected override void OnInitialized()
        {
            CssTileType = Tile.ResourceType switch
            {
                ResourceType.None => "",
                ResourceType.Rock => "rock",
                ResourceType.Wood => "forest",
                ResourceType.Fish => "lake",
                ResourceType.Cereal => "",
                ResourceType.Piece => "",
                _ => string.Empty
            };
        }
    }
}
