using BeWo.View.Detail.AI; using BeWo.ViewModel; using BeWo.ViewModel.View; using BS.Shared; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; namespace BeWo.Services { internal class BeWoControlFactory : IControlFactory { public Control GetAiConversationControl(AiConversationChatViewModel vm) { var styleString = getStyleString(vm.UIContext); var control = styleString is object ? new AiConversationChatView(vm, styleString) : new AiConversationChatView(vm); return control; } private string getStyleString(AiContextType uIContext) { switch (uIContext) { case AiContextType.SupportConceptNavigation: return "ModuleAiControlSupportConceptStyle"; case AiContextType.CustomerNavigation: return "ModuleAiControlCustomerStyle"; case AiContextType.PersonNavigation: return "ModuleAiControlPersonStyle"; case AiContextType.EmployeeNavigation: return "ModuleAiControlEmployeeStyle"; case AiContextType.OrganisationNavigation: return "ModuleAiControlOrganisationStyle"; case AiContextType.ServiceRecord: return "ModuleAiControlZeiterfassungStyle"; case AiContextType.CustomerDetail: return "ModuleAiControlCustomerStyle"; case AiContextType.PersonDetail: return "ModuleAiControlPersonStyle"; case AiContextType.EmployeeDetail: return "ModuleAiControlEmployeeStyle"; } return null; } } }