using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DialogHostAvalonia;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InABox.Avalonia.Components.DateSelector;

public partial class DateSelectorViewModel : BasePopupViewModel<DateTime?>
{
    [ObservableProperty]
    private DateTime? _date;

    [RelayCommand]
    private void Cancel()
    {
        Close(null);
    }

    [RelayCommand]
    private void Clear()
    {
        Close(DateTime.MinValue);
    }

    [RelayCommand]
    private void Today()
    {
        Close(DateTime.Today);
    }

    [RelayCommand]
    private void Select()
    {
        Close(Date);
    }
}
