using C4IT.FASD.Base;
using C4IT.Logging;

using FasdDesktopUi.Basics.Models;
using FasdDesktopUi.Basics.UserControls;
using FasdDesktopUi.Pages.CustomMessageBox;
using FasdDesktopUi.Pages.DetailsPage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using static C4IT.Logging.cLogManager;

namespace FasdDesktopUi.Basics.UiActions
{
    public class cUiShowNotepadQuickAction : cUiActionBase
    {       

        public cUiShowNotepadQuickAction()
        {
            
        }

        public override async Task<bool> RunUiActionAsync(object sender, UIElement UiLocation, bool isDetailedLayout, cSupportCaseDataProvider dataProvider)
        {
            try
            {
                if (!(UiLocation is DetailsPageView detailsPage))
                    return false;

                detailsPage.NotepadChangeVisibilityAction(this, true);
                return true;
            }
            catch (Exception E)
            {
                LogException(E);
            }

            await Task.CompletedTask;
            return false;   
        }
    }

}

