namespace KBX.Shared.Experience;

public sealed record SuggestionContext(
    string ScreenId,
    string ScreenVersion,
    string Route,
    string AppVersion,
    string UserRole,
    IReadOnlyList<string>? ActiveFilters,
    string? GridLayoutVersion);

public sealed record SubmitSuggestionCommand(
    string Category,
    string Message,
    bool IncludeScreenContext,
    SuggestionContext Context);

public sealed record AiScreenContext(
    string ScreenId,
    string ScreenVersion,
    Guid? EntityId,
    IReadOnlyList<Guid>? SelectedIds,
    IReadOnlyDictionary<string, object?>? Filters,
    IReadOnlyList<string> AllowedCapabilities);

public sealed record AiAskCommand(string Question, AiScreenContext Context);
public sealed record AiEvidence(string Label, string SourceType, string? Reference);
public sealed record AiAction(string Id, string Label, string Kind);
public sealed record AiAnswer(
    string Answer,
    IReadOnlyList<AiAction>? Actions = null,
    IReadOnlyList<AiEvidence>? Evidence = null,
    object? Proposal = null);
