using Radzen.Blazor;

namespace Radzen;

/// <summary>
/// Supplies information about a <see cref="RadzenDataGrid{TItem}.ColumnReordered" /> event that is being raised.
/// </summary>
/// <typeparam name="T">The data item type.</typeparam>
public class DataGridColumnReorderedEventArgs<
        [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields)] T> where T : notnull
{
    /// <summary>
    /// Gets the reordered RadzenDataGridColumn.
    /// </summary>
    public RadzenDataGridColumn<T>? Column { get; internal set; }

    /// <summary>
    /// Gets the old index of the column.
    /// </summary>
    public int OldIndex { get; internal set; }

    /// <summary>
    /// Gets the new index of the column.
    /// </summary>
    public int NewIndex { get; internal set; }
}

