using Microsoft.Graphics.Canvas.UI.Xaml;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace Sonex.Client.UserControls.DataGridView
{
    public interface IFilterFlyout
    {
        XamlRoot XamlRoot { get; set; }
        public void ShowAt(DependencyObject placementTarget, FlyoutShowOptions showOptions);
        public string? GetQuery();
        public bool SetQuery(string? query);
        public void Clean();
        public void Hide();
        public bool IsOpen { get; }
        public UIElement Content { get; set; }
        

    }
    public sealed partial class FilterFlyoutText : Flyout, IFilterFlyout
    {
        public FilterFlyoutText()
        {
            InitializeComponent();
            //this.Hide();
        }

        public string? GetQuery()
        {
            return "";
        }

        public bool SetQuery(string? query)
        {
            return true;
        }
        public void Clean()
        {
            
        }
        private void TextBox_GotFocus(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("TextBox focus OK");
        }
        private void TextBox_LostFocus(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("TextBox_LostFocus");
        }
    }
}
