// Copyright © Selmo Technology GmbH. All Rights Reserved

using Microsoft.AspNetCore.Components;

namespace SelmoStudio.Hmi.Server.Shared.Components.BaseComponents
{
    public partial class DropDownComponent
    {
        [Parameter]
        public object SelectedValue { get; set; }

        [Parameter]
        public IEnumerable<object> Values { get; set; }

        [Parameter]
        public string DisplayProperty { get; set; }

        [Parameter]
        public EventCallback<object> OnChange { get; set; }

        private async Task OnValueChange(object value)
        {
            await OnChange.InvokeAsync(value);
        }
    }
}