Option Strict On
Option Explicit On

Imports System
Imports Nexamas.UI.FileSystem

Namespace Nexamas.UI.Components

    ''' <summary>
    ''' Browser-level inline rename commit request mapped from MASListView to a FileSystemEntry.
    ''' The owner may cancel the commit and provide an error message; MASListView will keep the
    ''' inline editor open when cancellation is requested.
    ''' </summary>
    Friend NotInheritable Class MASFilePickerInlineRenameCommittedEventArgs
        Inherits EventArgs

        Friend Sub New(entry As FileSystemEntry,
                       originalText As String,
                       newText As String)

            Me.Entry = entry
            Me.OriginalText = If(originalText, String.Empty)
            Me.NewText = If(newText, String.Empty)
            Me.Cancel = False
            Me.ErrorMessage = String.Empty
        End Sub

        Friend ReadOnly Property Entry As FileSystemEntry
        Friend ReadOnly Property OriginalText As String
        Friend ReadOnly Property NewText As String

        Friend Property Cancel As Boolean
        Friend Property ErrorMessage As String

    End Class

End Namespace
