Imports System.Xml.Serialization
Imports DevExpress.Utils.Svg

Namespace SavedSearch
    Public MustInherit Class SavedSearch
        Public Property Name As String
        Public Property Description As String
        Public Property Image As SvgImage
        Public Property Selected As Boolean
        Public Overridable Property GroupText As String = ""

        Public ReadOnly Property DisplayName As String
            Get
                Return Name
            End Get
        End Property
    End Class

    Public Class PredefinedDateSearch
        Inherits SavedSearch

        'Public Property Image As SvgImage
        Public Overrides Property GroupText As String = "Vordefiniert"

        Public Property DateConstraint As Search.SearchRunner.DateConstraint
    End Class

    Public Class CustomSearch
        Inherits SavedSearch

        'Public Property Image As SvgImage
        Public Overrides Property GroupText As String = "Eigene"

        Public Tokens As New List(Of Search.SearchToken.Token)
    End Class

    <XmlInclude(GetType(Search.SearchToken.Token))>
    <XmlInclude(GetType(Search.SearchToken.AttributeValueToken))>
    <XmlInclude(GetType(Search.SearchToken.ValueOnlyToken))>
    Public Class CustomSearchSerializable
        Public Property Name As String
        Public Property Description As String
        Public Property ImageName As String
        Public Property GroupText As String
        Public Property Tokens As New List(Of Search.SearchToken.Token)
    End Class
End Namespace


