using FasdDesktopUi.Basics;
using FasdDesktopUi.Basics.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace FasdDesktopUi.Pages.DetailsPage.Commands
{
    public class SubMenuCommand : BaseCommand
    {
        public override void Execute(object parameter)
        {
            var detailsPage = cSupportCaseDataProvider.detailsPage;
            if (detailsPage == null)
                return;

            var dataCanvas = detailsPage.QuickActionSelectorUc;

            if (parameter is List<cMenuDataBase> subMenuData)
            {
                dataCanvas.QuickActionSelectorUc.TempQuickActionList = dataCanvas.QuickActionSelectorUc.QuickActionList;
                dataCanvas.QuickActionSelectorUc.TempQuickActionSelectorHeading = dataCanvas.QuickActionSelectorUc.QuickActionSelectorHeading;
                dataCanvas.QuickActionList = subMenuData;
            }
        }
    }
}
